Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Safari] Selection is locked in a nested editable #4192

Closed
Reinmar opened this issue Oct 3, 2017 · 12 comments · Fixed by ckeditor/ckeditor5-engine#1201
Closed

[Safari] Selection is locked in a nested editable #4192

Reinmar opened this issue Oct 3, 2017 · 12 comments · Fixed by ckeditor/ckeditor5-engine#1201
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Oct 3, 2017

You can't leave a nested editable by clicking somewhere in editor's content outside of that nested editable because engine re-renders selection inside that nested editable:

oct-03-2017 11-56-51

I can reproduce it e.g. here: https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/examples/builds/classic-editor.html

@Reinmar Reinmar changed the title [Safari] Selection locks in a nested editable [Safari] Selection is locked in a nested editable Oct 3, 2017
@scofalik
Copy link
Contributor

scofalik commented Oct 3, 2017

Looks serious, how it is possible and how did we missed it? Why would the selection be rendered there?

@pjasiun
Copy link

pjasiun commented Oct 3, 2017

So many questions, so few answers.

@Reinmar
Copy link
Member Author

Reinmar commented Oct 3, 2017

:trollface:

@scofalik
Copy link
Contributor

scofalik commented Oct 3, 2017

Could be related to #4188

@scofalik
Copy link
Contributor

scofalik commented Oct 3, 2017

TBH, I cannot reproduce it. I am using Safari version Version 11.0 (12604.1.38.1.7)

@Reinmar
Copy link
Member Author

Reinmar commented Oct 3, 2017

Do you try it in the docs?

I can reproduce it even on https://ckeditor5.github.io

Safari Version 11.0 (12604.1.38.1.7)

@scofalik
Copy link
Contributor

scofalik commented Oct 3, 2017

Yes, I tried in docs:

oct-03-2017 16-40-10

@Reinmar
Copy link
Member Author

Reinmar commented Oct 3, 2017

Strange. I can constantly reproduce it. I even changed the way I click (mouse vs trackpad). Dunno. So, let's wait for other to reproduce it.

@Mgsy
Copy link
Member

Mgsy commented Oct 3, 2017

how did we missed it?

We didn't :D #557.

I will close the issue in the main repository.

@scofalik
Copy link
Contributor

scofalik commented Oct 4, 2017

If you can reproduce it, can you go to file ckeditor5-engine/src/view/observer/focusobserver.js, and change:

this._renderTimeoutId = setTimeout( () => document.render(), 0 );

to

this._renderTimeoutId = setTimeout( () => document.render(), 100 );

And see if that helped?

@scofalik
Copy link
Contributor

scofalik commented Oct 4, 2017

Okay for some reason I started to be able to reproduce it :O. I can confirm that the fix above does help.

@Mgsy
Copy link
Member

Mgsy commented Oct 4, 2017

I can confirm that the fix above does help.

I also checked it and it works great 👍

@scofalik scofalik self-assigned this Oct 4, 2017
szymonkups referenced this issue in ckeditor/ckeditor5-engine Dec 12, 2017
Fix: Added a 50ms timeout after `Document#focus` event before rendering to be sure that selection changes are processed on Firefox and Safari. Closes ckeditor/ckeditor5#676. Closes #1157. Closes #1155. Closes #1153.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 14 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Oct 9, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants