Opened 14 years ago

Closed 10 years ago

#4800 closed bug (fixed)

Dialog: Modal UI Dialog stops links working if closed quickly

Reported by: rpcutts Owned by:
Priority: major Milestone: 1.7.2
Component: ui.dialog Version: 1.7.1
Keywords: modal Cc:
Blocked by: Blocking:

Description

If I call foo.dialog('open') to show a 'loading in progress' message but then foo.dialog('close') is fired in quick succession then any <a> links on my page stop working unless I use right click > open link.

All inputs still work and if another dialog is shown and then closed after a delay then the links start working again.

Change History (9)

comment:1 Changed 14 years ago by rpcutts

I have since created a simple test page to try and recreate the issue and am unable to do so at present. There must be something else involved in causing the problem.

comment:2 Changed 14 years ago by rpcutts

It seems <a> links do catch the button click but don't redirect.

I have gotten around the problem by calling foo.dialog('close') on the click event of all <a> tags.

comment:3 Changed 14 years ago by jdsharp

When the dialog is used in modal mode it binds a click event handler to the document. It appears that if your 'close' is firing before the dialog has fully loaded and the click event isn't unbound.

A work around would be to do $(document).unbind('.dialog-overlay');

Cheers,

  • Jonathan

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

Milestone: TBD1.8

Sounds like this can only be a problem by dialog using setTimeout somewhere.

comment:5 Changed 12 years ago by Scott González

Keywords: dialog links removed

comment:6 Changed 10 years ago by Scott González

Milestone: 1.9.01.10.0

comment:7 Changed 10 years ago by petersendidit

Status: newopen
Summary: Modal UI Dialog stops links working if closed quicklyDialog: Modal UI Dialog stops links working if closed quickly

comment:8 Changed 10 years ago by fontzter

I cannot replicate this bug. A test case that immediately chains a close to the creation of the dialog is here: http://jsfiddle.net/xwf7q/

On the creation of the overlay, there is a 1 millisecond setTimeout that binds the document events and returns false if they are below the z-index of the dialog. But it appears that is not causing a problem in the test case.

comment:9 Changed 10 years ago by Scott González

Milestone: 1.10.01.7.2
Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.