Opened 8 years ago

Closed 8 years ago

#14389 closed Bug (invalid)

url anchor/bookmark not working after ckeditor replace

Reported by: dsmith Owned by:
Priority: Normal Milestone:
Component: Core : Focus Version:
Keywords: Cc:

Description

Steps to reproduce

  1. Create a page with several text areas
  2. Use a script at the end of the html page to run CKEDITOR.replace('mytextarea') to turn the areas into editor blocks
  3. Link to that page (or have a Save function that refreshes the page) with a anchor tag at one of the editor blocks ("www.mysite.com/mypage#mybookmarkid")

Expected result

Page refreshes with cursor at the bookmarked item

Actual result

Page refreshes at the top of the page, ignoring the bookmark

Other details (browser, OS, CKEditor version, installed plugins)

Same results with Chrome/Firefox/Safari, Linux Fedora or Mac. Our page created via CakePHP 3.1 framework. Moving the script from the end to the beginning of the html makes no difference. The anchor tags work as expected if the Replace is not run. We can see the screen flicker as the Replaces are done. From that, we suspect that they are losing either the ID of the bookmark or that fact that the url requested a bookmark.

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.5.7

If you try the same with inline editor it will work.

What is the difference? The inline editor is part of the current HTML document. In classic CKEditor, textarea (which is also a part of the document) is replaced with iframe which embeds different document into current HTML document. Any anchor inside iframe is part of document in iframe and not the part of main document so it will not work.

Please try the same test with native iframe and you will get "not working" result.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy