Commit 34bd9137 authored by tanc's avatar tanc Committed by Devin Carlson

Issue #2548791 by tanc: 'Close' property undefined

parent 33f54877
......@@ -40,12 +40,16 @@
$dialog.dialog('widget').trigger('focus');
}
var originalClose = settings.dialog.close;
// Overwrite the close method to remove the dialog on closing.
settings.dialog.close = function (event) {
originalClose.apply(settings.dialog, arguments);
$(event.target).remove();
};
// @todo: Verify that this was the correct change after
// http://drupal.org/node/2498915 is fixed in core.
if (settings.hasOwnProperty('dialog')) {
var originalClose = settings.dialog.close;
// Overwrite the close method to remove the dialog on closing.
settings.dialog.close = function (event) {
originalClose.apply(settings.dialog, arguments);
$(event.target).remove();
};
}
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment