Skip to content

Commit

Permalink
Popup: Binds document mousedown instead of click. The click event is …
Browse files Browse the repository at this point in the history
…triggered when the mouse button is released, which virtually always exceeds _closeTry delay, leading to erroneous popup close.
  • Loading branch information
rxaviers committed May 26, 2012
1 parent c6cce9c commit 96c6b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ $.widget( "ui.popup", {
});

this._bind( this.document, {
click: function( event ) {
mousedown: function( event ) {
if ( this.isOpen ) {
if ( $( event.target ).closest( this.element.add( this.options.trigger ) ).length ) {
this._closeVet();
Expand Down

0 comments on commit 96c6b94

Please sign in to comment.