Merge pull request #927 from qtheuret/web_dialog_size_issue_921

[FIX] #921 Fixed issue when discard a modal with draggable element
This commit is contained in:
Pedro M. Baeza
2018-05-16 10:54:56 +02:00
committed by GitHub

View File

@@ -37,9 +37,11 @@ Dialog.include({
}, },
close: function() { close: function() {
var draggable = this.$modal.draggable( "instance" ); if (this.$modal) {
if (draggable) { var draggable = this.$modal.draggable("instance");
this.$modal.draggable("destroy"); if (draggable) {
this.$modal.draggable("destroy");
}
} }
return this._super.apply(this, arguments); return this._super.apply(this, arguments);
}, },