File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ $.widget( "ui.popup", {
38
38
39
39
this . _bind ( this . options . trigger , {
40
40
keydown : function ( event ) {
41
- // prevent space-to-open to scroll the page
42
- // TODO do this only for a:ui-button?
43
- if ( event . keyCode == $ . ui . keyCode . SPACE ) {
41
+ // prevent space-to-open to scroll the page, only hapens for anchor ui.button
42
+ if ( $ ( event . currentTarget ) . is ( "a:ui-button" ) && event . keyCode == $ . ui . keyCode . SPACE ) {
44
43
event . preventDefault ( )
45
44
}
46
- // TODO handle keydown to open popup?
47
- //if (event.keyCode == $.ui.keyCode.SPACE) { .. }
45
+ // TODO handle keydown to open popup? only when not handled by ui.button
46
+ //if (event.keyCode == $.ui.keyCode.SPACE) {
47
+ //}
48
48
} ,
49
49
click : function ( event ) {
50
50
event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments