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
- Create a new node of a content type that uses a WYSIWYG editor.
- Scroll down to the editor.
- Create a link within the WYSIWYG editor that points to
#main-content
. - Click on the link.
- Observe that the browser does not jump up to the top of the page.
Edited by Alfonso Gómez-Arzola