From 62446d957efb69cd53015919edf71501fcbd2599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 17 Jul 2015 11:00:44 -0400 Subject: [PATCH] Dialog: Fix removal of event listener for modal dialogs Fixes #13649 --- ui/dialog.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/dialog.js b/ui/dialog.js index a9238329e..e58e0c8cc 100644 --- a/ui/dialog.js +++ b/ui/dialog.js @@ -860,9 +860,8 @@ $.widget( "ui.dialog", { var overlays = this.document.data( "ui-dialog-overlays" ) - 1; if ( !overlays ) { - this.document - .off( "focusin" ) - .removeData( "ui-dialog-overlays" ); + this._off( this.document, "focusin" ); + this.document.removeData( "ui-dialog-overlays" ); } else { this.document.data( "ui-dialog-overlays", overlays ); }