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:

  1. Install drupal including the overlay module.
  2. Go to the extend page (admin/modules). - This should open in the overlay.
  3. Click the description for the "System" module to expand it.
  4. 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();
  });

Comments

rooby’s picture

Assigned: Unassigned » rooby
rooby’s picture

Status: Active » Needs review
StatusFileSize
new1007 bytes

Patch for fix.

andymartha’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new72.43 KB
new54.38 KB

On 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.

overlaybefore1.png

overlayafter1.png

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

The 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-system but it should be /#overlay=admin/people/permissions#module-system

As 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.

rooby’s picture

Status: Needs work » Needs review

Sorry, 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.

alexpott’s picture

Status: Needs review » Postponed

Yep rooby you're right they are separate issues... so we need to postpone this on #1129578: Overlay doesn't respect internal anchor links

broon’s picture

Just 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.

mgifford’s picture

Version: 8.0.x-dev » 7.x-dev

Overlay isn't in D8 anymore!

Status: Postponed » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.