diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-09-13 00:27:54 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-09-13 00:27:54 +0200 |
commit | 45ed8d8447ce270682a1294cbd120195d446d907 (patch) | |
tree | b79f9d89fc73783330d12196a204bc81a90ad6e1 /ui/jquery.ui.popup.js | |
parent | e1ec6f8ebb509b636840dfad11aa062c9877beac (diff) | |
download | jquery-ui-45ed8d8447ce270682a1294cbd120195d446d907.tar.gz jquery-ui-45ed8d8447ce270682a1294cbd120195d446d907.zip |
Popup: Replace var that with this and _delay
Diffstat (limited to 'ui/jquery.ui.popup.js')
-rw-r--r-- | ui/jquery.ui.popup.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/jquery.ui.popup.js b/ui/jquery.ui.popup.js index 8e5cf198c..15349bc23 100644 --- a/ui/jquery.ui.popup.js +++ b/ui/jquery.ui.popup.js @@ -72,10 +72,9 @@ $.widget( "ui.popup", { // let it propagate to close return; } - var that = this; clearTimeout( this.closeTimer ); - setTimeout(function() { - that.open( event ); + this._delay(function() { + this.open( event ); }, 1); } }); @@ -102,11 +101,10 @@ $.widget( "ui.popup", { this._bind({ focusout: function( event ) { - var that = this; // use a timer to allow click to clear it and letting that // handle the closing instead of opening again - that.closeTimer = setTimeout( function() { - that.close( event ); + this.closeTimer = this._delay( function() { + this.close( event ); }, 100); }, focusin: function( event ) { |