diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-06-14 12:33:16 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-06-14 12:33:16 -0400 |
commit | ff39bed57a05ca060033187b8aecebafab357f78 (patch) | |
tree | e82f4c3faa3b5269f0f86e3f186a6f3024ad7466 /ui/jquery.ui.dialog.js | |
parent | 00d4beb0ca4a99933bb7e786a1dd50618c180a0b (diff) | |
download | jquery-ui-ff39bed57a05ca060033187b8aecebafab357f78.tar.gz jquery-ui-ff39bed57a05ca060033187b8aecebafab357f78.zip |
Widget: Added _off() for removing event handlers. Fixes #7795 - Widget: _on and _off.
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r-- | ui/jquery.ui.dialog.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 4ef8a20cb..a22eef806 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -224,7 +224,7 @@ $.widget("ui.dialog", { if ( this.overlay ) { this.overlay.destroy(); } - this.uiDialog.unbind( "keypress.ui-dialog" ); + this._off( this.uiDialog, "keypress" ); if ( this.options.hide ) { this.uiDialog.hide( this.options.hide, function() { @@ -310,7 +310,7 @@ $.widget("ui.dialog", { // prevent tabbing out of modal dialogs if ( options.modal ) { - uiDialog.bind( "keydown.ui-dialog", function( event ) { + this._on( uiDialog, { keydown: function( event ) { if ( event.keyCode !== $.ui.keyCode.TAB ) { return; } @@ -326,7 +326,7 @@ $.widget("ui.dialog", { last.focus( 1 ); return false; } - }); + }}); } // set focus to the first tabbable element in the content area or the first button |