* Fix condition that would rarely cause dialogs to not open properly (dialog wasn't getting destroyed before being replaced)
This commit is contained in:
parent
4b39567e29
commit
20ef7acda5
@ -74,7 +74,9 @@ window.dialog = function(options) {
|
|||||||
// Close out existing dialogs.
|
// Close out existing dialogs.
|
||||||
if(window.DIALOGS[id]) {
|
if(window.DIALOGS[id]) {
|
||||||
try {
|
try {
|
||||||
$(window.DIALOGS[id]).dialog('close');
|
var selector = $(window.DIALOGS[id]);
|
||||||
|
selector.dialog('close');
|
||||||
|
selector.remove();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log('window.dialog: Tried to close nonexistent dialog ' + id);
|
console.log('window.dialog: Tried to close nonexistent dialog ' + id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user