File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ $.widget( "ui.popup", {
39
39
this . _bind ( this . options . trigger , {
40
40
click : function ( event ) {
41
41
event . preventDefault ( ) ;
42
+ if ( this . open ) {
43
+ // let it propagate to close
44
+ return ;
45
+ }
42
46
var that = this ;
43
47
setTimeout ( function ( ) {
44
48
that . _open ( event ) ;
@@ -47,10 +51,14 @@ $.widget( "ui.popup", {
47
51
} ) ;
48
52
49
53
this . _bind ( this . element , {
50
- blur : "_close"
54
+ // TODO also triggered when open and clicking the trigger again
55
+ // figure out how to close in that case, while still closing on regular blur
56
+ //blur: "_close"
51
57
} ) ;
52
58
53
59
this . _bind ( {
60
+ // TODO only triggerd on element if it can receive focus
61
+ // bind to document instead?
54
62
keyup : function ( event ) {
55
63
if ( event . keyCode == $ . ui . keyCode . ESCAPE && this . element . is ( ":visible" ) ) {
56
64
this . _close ( event ) ;
You can’t perform that action at this time.
0 commit comments