ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Deleting editor contents with trailing image inline in Safari scroll the page to the top

Open dtdesign opened this issue 2 years ago • 6 comments

📝 Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/docs/ckeditor5/latest/features/images/images-overview.html
  2. Remove everything after the logo of Warsaw in the headline.
  3. Use Cmd+A to select everything in the editor.
  4. Hit backspace to delete the selected contents.
  5. The page is now scrolled to the very top.

✔️ Expected result

The editor should be cleared and the caret placed at the beginning of an empty paragraph.

❌ Actual result

The editor is cleared, but the page is being scrolled to (0,0).

https://github.com/ckeditor/ckeditor5/assets/208610/b5ab43bd-f877-4439-838a-4b8dbaefc9fc

📃 Other details

  • Browser: Safari 16.5.1
  • OS: macOS 13.4.1
  • First affected CKEditor version: Unknown
  • Installed CKEditor plugins: ImageInline and possibly others, uses online demo from the official docs

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

dtdesign avatar Jul 10 '23 12:07 dtdesign

I just thought about checking the document selection to verify if there are any oddities. I can confirm that the selection immediately before the removal and right after is within the <h2> inside the editor. The editor also remains focused as visible by the blue outline.

However, notice that there is no visible caret despite the focus being inside the editor. Typing any character will insert it in the headline and immediately showing the caret. Backspacing that caret will show an empty headline in the editor but with a blinking caret that was previously absent.

Blurring the editor after the scroll happened and manually clicking on the headline will also show a proper blinking caret.

dtdesign avatar Jul 10 '23 12:07 dtdesign

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Jul 11 '24 03:07 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Aug 14 '24 02:08 CKEditorBot

@Witoso May I ask you to reopen this issue? The reaction was incorrectly added to the bot’s comment instead of the issue itself which caused this to be closed unintentionally.

The problem in this issue continues to exist and the above description is still accurate.

dtdesign avatar Dec 04 '24 14:12 dtdesign

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Dec 04 '25 23:12 CKEditorBot

This issue is still present and can be reproduced in Safari 26.1.

dtdesign avatar Dec 05 '25 09:12 dtdesign