1 | | I am using slick grid within a dialog. |
2 | | I ran into the following problem only in firefox: |
3 | | I add a contextmenu handler to a cell in a table in a dialog. |
4 | | The contextmenu event is only called when double right clicking. |
5 | | Here is a simplified example: |
6 | | http://jsbin.com/idayod/2/edit |
7 | | |
8 | | When you only right click once the event is stopped in the mousedown event somewhere around here: |
9 | | |
10 | | |
11 | | {{{ |
12 | | $( document ).bind( $.ui.dialog.overlay.events, function( event ) { |
13 | | // stop events if the z-index of the target is < the z-index of the overlay |
14 | | // we cannot return true when we don't want to cancel the event (#3523) |
15 | | if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) { |
16 | | return false; |
17 | | } |
18 | | }); |
19 | | }}} |
20 | | Line ~690 in jquery.ui.dialog.js |
21 | | |
22 | | EDIT: |
23 | | A possible fix would be to check if the dialog contains the element I think. |
24 | | Something like this: |
25 | | |
26 | | {{{ |
27 | | |
28 | | if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ && !(dialog.element.has(event.target).length ) ) { |
29 | | return false; |
30 | | } |
31 | | }}} |
32 | | |
| 1 | EDIT: moved to new ticket |