Skip to content
Snippets Groups Projects

Update fragment link event listener selector to exclude links inside WYSIWYG editors

This MR fixes a bug in core/misc/form.js which causes browsers to navigate to an anchor when a user clicks on a fragment link within a WYSIWYG editor. See related issue for details.

How to test this PR

  1. Create a new node of a content type that uses a WYSIWYG editor.
  2. Scroll down to the editor.
  3. Create a link within the WYSIWYG editor that points to #main-content.
  4. Click on the link.
  5. Observe that the browser does not jump up to the top of the page.

Closes #3339741

Edited by Alfonso Gómez-Arzola

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Alfonso Gómez-Arzola resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • added 3 commits

    • 0b4c7eb7 - Scope test link selector to inside WYSIWYG
    • 3b6dbdce - Wait for WYSIWYG editor to be on the page before anything
    • 3a4b21ae - Improve test assertion message

    Compare with previous version

  • added 166 commits

    • 3a4b21ae...60c2916b - 161 commits from branch project:10.1.x
    • 48a3b6ee - Update fragment link event listener selector to avoid links inside WYSIWYG editors
    • 98321333 - Add JS form test
    • e51cbd4a - Scope test link selector to inside WYSIWYG
    • d8cf247c - Wait for WYSIWYG editor to be on the page before anything
    • 9e29dccb - Improve test assertion message

    Compare with previous version

  • Alfonso Gómez-Arzola changed the description

    changed the description

  • added 1 commit

    Compare with previous version

  • added 48 commits

    • 05fa6e9d...04e2c71a - 42 commits from branch project:10.1.x
    • b347cb5b - Update fragment link event listener selector to avoid links inside WYSIWYG editors
    • ad69ef63 - Add JS form test
    • eeb81fa1 - Scope test link selector to inside WYSIWYG
    • 426078fb - Wait for WYSIWYG editor to be on the page before anything
    • 24d1ff20 - Improve test assertion message
    • 19d81597 - Code style improvements

    Compare with previous version

  • Adam Bramley added 3609 commits

    added 3609 commits

    • 19d81597...b25bc52e - 3603 commits from branch project:11.x
    • 1ce8969f - Update fragment link event listener selector to avoid links inside WYSIWYG editors
    • 2bc0090c - Add JS form test
    • 73ced57d - Scope test link selector to inside WYSIWYG
    • 426031fc - Wait for WYSIWYG editor to be on the page before anything
    • 8ad725ef - Improve test assertion message
    • 2b8ac8b0 - Code style improvements

    Compare with previous version

  • Please register or sign in to reply
    Loading