Skip to content
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

Selection rendering breaks composition #3742

Closed
pjasiun opened this issue Jun 2, 2016 · 7 comments · May be fixed by ckeditor/ckeditor5-engine#861
Closed

Selection rendering breaks composition #3742

pjasiun opened this issue Jun 2, 2016 · 7 comments · May be fixed by ckeditor/ckeditor5-engine#861
Labels
domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). package:engine pending:feedback This issue is blocked by necessary feedback. resolution:expired This issue was closed due to lack of feedback. status:stale type:bug This issue reports a buggy (incorrect) behavior.

Comments

@pjasiun
Copy link

pjasiun commented Jun 2, 2016

This check should prevent changing selection on composition: https://github.com/ckeditor/ckeditor5-engine/blob/cc5c39ec02a8096a92b246a331d9240eef1e272d/src/view/renderer.js#L428

It works for the regular navigation, but because of some reason during the composition, when I press left arrow to change the character value, the offsets do not match, selection is rerendered and composition is broken.

@Reinmar
Copy link
Member

Reinmar commented Jun 2, 2016

That's why I said that during composition ALL rendering must be stopped.

@Reinmar
Copy link
Member

Reinmar commented Jul 6, 2016

This is iteration 3 as it doesn't involve a cleanup but rather a bug fix.

@f1ames f1ames self-assigned this Mar 7, 2017
@pjasiun
Copy link
Author

pjasiun commented Mar 23, 2017

The long discussion unfortunately landed in the PR: ckeditor/ckeditor5-engine#861.

@Reinmar
Copy link
Member

Reinmar commented Jul 20, 2017

Proof that we can't render anything during composition: ckeditor/ckeditor5-typing#110 (comment).

@f1ames
Copy link
Contributor

f1ames commented Mar 6, 2018

Blocking selection during composition may be problematic due to the way how renderer works now. The fact that some nodes may be replaced during composition (see ckeditor/ckeditor5-engine#1334 for more details) results in selection changing its position:

mar-06-2018 11-09-36-chrome-selection

In the above example I simply blocked the renderer._updateSelection during composition. After inserting the first character renderer updates the nodes like:

  1. Initial: <strong>^Bold</strong>
  2. Character X inserted which causing rerender in renderer._updateChildren (with insert/delete):
    <strong>XBold^Bold</strong>
  3. Selection is moved by DOM element manipulation.

So in this case to make selection stay where it is we could:

@f1ames f1ames removed their assignment Mar 7, 2018
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the nice-to-have milestone Oct 9, 2019
@mlewand mlewand added pending:feedback This issue is blocked by necessary feedback. status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Oct 9, 2019
@Reinmar Reinmar added the domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). label Nov 4, 2021
@pomek pomek removed this from the nice-to-have milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

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 be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity over the last year. 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 CKEditorBot added the resolution:expired This issue was closed due to lack of feedback. label Nov 2, 2023
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). package:engine pending:feedback This issue is blocked by necessary feedback. resolution:expired This issue was closed due to lack of feedback. status:stale type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants