Skip to content

Issue #3339741: Clicking on an anchor link within CKEditor 5 navigates to anchor

This MR fixes a bug in core/misc/form.es6.js (and related non-ES6 version of the file) 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.
Edited by Alfonso Gómez-Arzola

Merge request reports