Ticket #8441 (confirmed Bug)
Selection not updating when moving from left -> right
| Reported by: | Helmø2 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Selection | Version: | 3.0 |
| Keywords: | Cc: |
Description
The editor.on( 'selectionChange' ) is not called when text is selected with the mouse moving from left to right when using Chrome v14.0.
This can be veryfied in the nightly build: http://nightly.ckeditor.com/7293/_samples/replacebyclass.html
In order to replicate the bug place the cursor in between the bold text "sample text" and the link "CKEditor". Now drag the selection towards the left. Notice how the enabling of the bold action-button in the toolbar shifts to TRISTATE_ON and then to TRISTATE_OFF when past the bold text.
If the same is done from left to right (starting with the cursor to the left of the bold text and then dragging the selection towards the right then the bold action-button is not affected?!?
Change History
comment:1 Changed 20 months ago by j.swiderski
- Status changed from new to confirmed
- Version changed from 3.6.2 to 3.0
- Summary changed from Selection not updating when moving from left -> right in Chrome to Selection not updating when moving from left -> right
comment:2 Changed 20 months ago by Helmø2
I think the problem has something to do with the "direction" of the selection. It is not possible (in the code) to see weather it goes from left to right or from right to left.
It seems like the enabling of the actions/buttons depends on the "left-most" point in the selection (the point closest to the start of the text) - thus when expanding the selection from left to right - the enabling will be set according to the "left-most" position and not according to the end position... In my opinion the enabling should always be the position of the cursor.

This has been reproducible in all browsers from CKEditor 3.0
Open replacebycode sample.
Result: bold button will be activated
Result: bold button will not be activated