With the overlay module enabled, if you go to the extend/modules page it opens in the overlay.
Then if you expand a collapsible module description and click one of the administration links, like permissions or configuration, that page will not open in the overlay. Instead you will end up on that page without the overlay.
To reproduce:
- Install drupal including the overlay module.
- Go to the extend page (admin/modules). - This should open in the overlay.
- Click the description for the "System" module to expand it.
- Click the "Permissions" link for the System module. - It will not open in the overlay.
The problem is:
In the overlay module, the Drupal.overlay.eventhandlerOverrideLink function is bound to the click.drupal-overlay & mouseup.drupal-overlay events.
Normally then you click a link it will fire Drupal.overlay.eventhandlerOverrideLink twice, once for mouseup and once for click.
However, in these collapsible descriptions, it only firest for the mouseup event.
The reason for this is that the system module (in system.modules.js) stops propagation of the click event when clicking links inside the collapsible descriptions.
Lines 58-61 of system.modules.js:
// Don't close the row when clicking a link in the description.
$tbodies.on('click', '.description a', function (e) {
e.stopPropagation();
});
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | overlaybefore1.png | 54.38 KB | andymartha |
| #3 | overlayafter1.png | 72.43 KB | andymartha |
| #2 | drupal-module_description_links_no_overlay-1938560-2.patch | 1007 bytes | rooby |
Comments
Comment #1
rooby commentedComment #2
rooby commentedPatch for fix.
Comment #3
andymartha commentedOn a fresh install of Drupal 8, I can confirm that before installing patch drupal-module_description_links_no_overlay-1938560-2.patch in #2 by Rooby, the in-page links like "permissions" link on a the modules/extend page would open without the overlay whether overlay was enabled or not. After applying the patch, the links would open in the overlay most of the time. I don't know if it was a caching or browser hiccup, and I couldn't get a screenshot of it. But most of the time, links would open in the overlay like the resolution suggested.
Comment #4
alexpottThe patch works but unfortunately exposes another issue that when you follow the instructions in issue summary (@rooby nice bug report btw) then you'll see that because the overlay js replaces the # in the link we now longer jump to the right part of the form. You can see in @andymartha's helpful screenshot. The link is
/#overlay=admin/people/permissions%23module-systembut it should be/#overlay=admin/people/permissions#module-systemAs this code exposes this bug we need to fix it here because at the moment if you click the permissions link in the system module description on the modules page you'll end up at the right place in the permissions page but (admittedly) not in the overlay.
Comment #5
rooby commentedSorry, I probably should have mentioned before, but the reason I found this was that I was investigating #1129578: Overlay doesn't respect internal anchor links.
That issue addresses the problem you mention.
I figured seeing as it was technically 2 different problems they should have their own issues.
Comment #6
alexpottYep rooby you're right they are separate issues... so we need to postpone this on #1129578: Overlay doesn't respect internal anchor links
Comment #7
broonJust wanted to inform you, that I can not confirm that with latest 8.x-dev (checked out today via git). Followed instructions in opening post and was never thrown out of overlay.
Comment #8
mgiffordOverlay isn't in D8 anymore!