Remove/edit "ext" class for links without icon placement on existing websites

Created on 24 September 2024, 6 months ago

The change in https://www.drupal.org/project/extlink/issues/3373510 πŸ› The ext class gets removed if you uncheck adding an icon Fixed introduced a bug on my site (and possibly other's sites). We were previously using this module just to ensure links would open in a new tab, didn't want the icon, so the "ext" class was never added to our links. Since updating, the "ext" class is present on all links, and we actually have css already using that ".ext" class, so now that css is being applied to all the links. Not idea. Maybe we just need to expose the class name in the form somehow so people can change it if needed?
Rather than using
'#return_value' => 'ext',
in the form element and hardcoding it in the js here:
Drupal.extlink.applyClassAndSpan(externalLinks, 'ext', hasExtIcon ? extIconPlacement : null);
We could remove that return value, and switch the js back to
Drupal.extlink.applyClassAndSpan(externalLinks, drupalSettings.data.extlink.extClass, hasExtIcon ? extIconPlacement : null);
something like that?

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada porchlight

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024