-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't change the selection while calling Editor#getData() in intervals #12219
Comments
Results of my debugging. Normal flow:
The invalid flow:
So the problem was that sometimes the |
I suppose the delay with which Very interesting case. Thanks for a detailed writeup. |
BTW, we realized that this scenario to make It only makes sense to call Thanks to that @ckeditor/qa-team, could you check on We also discussed #12223 and another idea appear. What if we delayed the @niegowski Could you verify this and if it works, add this improvement to the PR? |
I checked it and as you described - with autosave there is no problem with selecting the cells. |
I was trying to debounce the Another thing is that the delay seems to give inconsistent results. Sometimes it manages to handle the selection change and sometimes it does not. I'm wondering about another solution. Since the whole thing is about outdated model/view selection then maybe we could force model selection update (flush) just before the renderer is about to kick in after selecting is done. |
📝 Provide detailed reproduction steps (if any)
setInterval( () => console.log( editor.getData() ), 200 )
.❌ Actual result
It's impossible to change the selection or the selection jumps.
📃 Other details
It's not reproducible in v30.0.0 https://ckeditor.com/docs/ckeditor5/30.0.0/examples/builds/classic-editor.html.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: