Opened 8 years ago
Last modified 8 years ago
#14847 confirmed Bug
[Safari] Scrolls editor viewport to the top and changes selection after confirming cancelling changes in a dialog
Reported by: | kkrzton | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Steps to reproduce
- Go to http://ckeditor.com/demo#div.
- Scroll editor viewport a little bit and select some text.
- Open Link dialog.
- Put
ckeditor.com
in the URL field. - Click cancel.
- Click ok on the confirmation dialog.
Expected result
The dialog is closed, selection and scroll position in the editor does not change.
Actual result
The dialog is closed, the editor viewport is scrolled to the top and caret is placed on the beginning of the editor content.
Other details (browser, OS, CKEditor version, installed plugins)
Safari 9.1.3
Change History (4)
comment:1 Changed 8 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 8 years ago by
comment:4 Changed 8 years ago by
The thing is this also happens in iframe editor, you can follow the steps from issue description but on http://ckeditor.com/demo and result is the same. It seems like the main cause of this issue is selection which is set to the beginning of the editor content after clicking ok on confirmation dialog.
The scrolling effect happened also in other WebKit browsers before applying the #14659 fix. However in Safari there is also a problem with selection which happens only in this browser.
If you look at this jsfiddle (https://jsfiddle.net/v1bbspoe/3/) it seems that confirmation dialog and native focus causes contenteditable to lose selection.