Close user language preference drop down when it loses focus. Fixes #2956

This commit is contained in:
Khushboo Vashi 2018-01-03 13:36:49 +00:00 committed by Dave Page
parent 1dd1c10255
commit 90629da524

View File

@ -91,16 +91,18 @@ define('pgadmin.preferences', [
* Clear the existing html in the preferences content
*/
var content = $container.find('.preferences_content');
content.empty();
/*
* We should clean up the existing controls.
*/
if (controls) {
_.each(controls, function(c) {
if ('$sel' in c) {
if (c.$sel.data('select2').isOpen()) c.$sel.data('select2').close();
}
c.remove();
});
}
content.empty();
controls = [];
/*