Skip to main content

Search and Top Navigation

#8583 closed bug (fixed)

Opened September 18, 2012 09:24AM UTC

Closed October 24, 2012 09:05PM UTC

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:

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:

(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( $, 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 ( $( ).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 ( $( ).zIndex() < $.ui.dialog.overlay.maxZ && !(dialog.element.has( ) ) {
return false;
Attachments (0)
Change History (5)

Changed October 11, 2012 02:47PM UTC by scottgonzalez comment:1


Changed October 15, 2012 04:44PM UTC by drewkimrey comment:2

status: newopen

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

Changed October 22, 2012 03:27PM UTC by scottgonzalez comment:3

keywords: → modal

Changed October 24, 2012 02:30AM UTC by jzaefferer comment:4

summary: Mouse event wrongly stoppedDialog: Mouse event wrongly stopped

Changed October 24, 2012 09:05PM UTC by Nate Eagle comment:5

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