Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
overlay.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2009 at 02:00 UTC
Updated:
28 Dec 2009 at 16:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
gábor hojtsyI was immediately about to say this is an issue with toolbar, since it reloads the page with the link. However, without the overlay, it indeed does not reload the page, so it is a problem with the overlay interaction for sure.
Comment #2
gábor hojtsyOk, the issue here is that we have two click handlers. One in overlay-parent.js:
The other in toolbar.js:
Unfortunately the first runs before the second, so the reload is already started by the time the toolbar can start toggling and trying to stop the event flow. It cannot stop the event that started earlier obviously.
We have a few options to fix this:
- get the toolbar.js run before overlay-parent.js (can be a fragile solution)
- come up with a name and add a class on the toggle link to exclude it from the displace click simulation
- somehow delay that redirect and wait for whether someone else handles the link (sounds bloated)
I picked the second idea I had and put in a preprocess chunk to add a class by the overlay and then skip links with that class in the click handler. Obviously if the toolbar is replaced with something else having similar controls in the toolbar or any bottom bar, they'd need to add this class for similar click-hook links.
With this patch, the toolbar works fine with me with the overlay.
Comment #3
roborn commentedConfirmed. The toolbar + overlay works fine with this patch.
Tested on FF3.5 and Chrome3.
Comment #4
mcrittenden commentedSub.
Comment #5
webchickCommitted to HEAD. Thanks!