Opened 10 years ago
Closed 10 years ago
#12491 closed Bug (fixed)
[Webkit/Blink] Error or incorrect selection restored on removeFillingChar
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.6 |
Component: | General | Version: | |
Keywords: | Webkit Blink | Cc: |
Description
- Clear contents.
- Type "xx".
- Press left arrow once.
- CTRL+B.
- Type "yy".
- Press CTRL+A.
Selection first covers all text, then it's immediately moved to "x".
Depending on number of letters this may also cause error caused by wrong offsets in removeFillingChar.
Change History (6)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 10 years ago by
Next case:
- Clear contents.
- Type "xx".
- Press left arrow once.
- CTRL+B.
- Type "yzzzzy".
- Select, using mouse, part "zzzz" from right to left.
- Selection is lost.
This TC is caused by the part of code touched in #12489 which does not handle selection direction. Code in the removeFillingChar
function also does not care about selection direction and should be fixed too, because after user makes selection using mouse that code will be triggered when (s)he tries to expand selection using arrow keys.
comment:4 Changed 10 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → review |
#12491 and #12489 became too related to each other, so let's conclude both here.
Fixed TCs:
TC1:
- Clear contents.
- Type few letters.
- Press SHIFT+ENTER.
- Type few letters.
- Click the text in the second line.
- Selection is moved back to the end of the second line.
TC2:
- Clear contents.
- Press CTRL+B.
- Type few letters.
- Click in the middle of the line.
- Selection is moved back to the end of the line.
TC3:
- Clear contents.
- Press CTRL+B.
- Type 4 characters.
- Select 2 and 3 character by mouse.
- Selection is moved to the beginning of the line.
TC4:
- The same as TC3, but make sure to select text from right to left.
- If TC3 worked correctly, check if you can expand the selection using SHIFT+LEFT. If selection's direction was not preserved the selection will shrink instead of expanding.
TC5:
- Clear contents.
- Type "xx".
- Press left arrow once.
- CTRL+B.
- Type "yy".
- Press CTRL+A.
- Selection first covers all text, then it's immediately moved to "x".
- Depending on number of letters this may also cause error caused by wrong offsets in removeFillingChar.
Other cases worth checking
TC6 (#8617):
- Clear contents.
- Type few letters.
- CTRL+B, type few letters.
- CTRL+I, type few letters.
- Press left arrow.
Problem (selection moved incorrectly) can be reproduced before #8617: http://rev.ckeditor.com/ckeditor/trunk/7392/_samples/replacebycode.html
Code
Pushed branch:t/12491 which is based on branch:t/12489.
comment:5 Changed 10 years ago by
Milestone: | → CKEditor 4.4.6 |
---|---|
Status: | review → review_passed |
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on master with git:958d7c9.
Related ticket: #8617.