Opened 7 years ago

Closed 7 years ago

#8583 closed bug (fixed)

Dialog: Mouse event wrongly stopped

Reported by: drakes Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.dialog Version: 1.8.23
Keywords: modal Cc:
Blocked by: Blocking:

Description

I am using slick grid within a dialog. I ran into the following problem only in firefox: I add a contextmenu handler to a cell in a table in a dialog. The contextmenu event is only called when double right clicking. Here is a simplified example: http://jsbin.com/idayod/2/edit (The alert only shows up on double right clicking)

When you only right click once the event is stopped in the mousedown event somewhere around here:

$( document ).bind( $.ui.dialog.overlay.events, function( event ) {
// stop events if the z-index of the target is < the z-index of the overlay
// we cannot return true when we don't want to cancel the event (#3523)
if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
return false;
}
});

Line ~690 in jquery.ui.dialog.js

A possible fix would be to check if the dialog contains the element I think. Something like this:

if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ && !(dialog.element.has(event.target).length ) ) {
return false;
} 

Change History (5)

comment:1 Changed 7 years ago by Scott González

Milestone: 1.9.01.10.0

comment:2 Changed 7 years ago by drewkimrey

Status: newopen

I was able to recreate, however only in FF windows. FF mac worked great. Recreated in js fiddle with current versions here: http://jsfiddle.net/EGBxh/

comment:3 Changed 7 years ago by Scott González

Keywords: modal added

comment:4 Changed 7 years ago by Jörn Zaefferer

Summary: Mouse event wrongly stoppedDialog: Mouse event wrongly stopped

comment:5 Changed 7 years ago by Nate Eagle

Resolution: fixed
Status: openclosed

Dialog: Awesome new stacking and overlay implementation. Fixes the following tickets:

Fixes #3534 - Dialog: Modal dialog disables all input elements on page. Fixes #4671 - Dialog: Modal Dialog disables vertical scroll bar in Chrome & Safari. Fixes #4995 - Dialog: Modal Dialog's overlay dissapears in IE when content is tall. Fixes #5388 - Dialog: Don't change z-index when already at the top. Fixes #5466 - Dialog: "modal" Dialog Incorrectly Cancels Input Events. Fixes #5762 - Dialog: Get rid of z-index workaround, document it instead. Fixes #6267 - Dialog: checkboxes that inherit a z-index < jqueryui.dialog z-index don't work. Fixes #7051 - Dialog: modal prevents tab key from moving focus off slider handle. Fixes #7107 - Dialog: Modal dialog event loss with high zindex child elements (FF 3.6). Fixes #7120 - Dialog: Modal operation interrupts drag drop marker functionality on gmaps. Fixes #8172 - Dialog: Change event cancelled when opening modal dialog from another modal dialog. Fixes #8583 - Dialog: Mouse event wrongly stopped. Fixes #8722 - Dialog: Remove stack option. Fixes #8729 - Dialog: Remove zIndex option.

Changeset: 3829a37ca122e923c3a08b964c4b1a946a2a1456

Note: See TracTickets for help on using tickets.