Opened 13 years ago

Last modified 12 years ago

#8441 confirmed Bug

Selection not updating when moving from left -> right

Reported by: Henrik Helmø Larsen 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 (2)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Summary: Selection not updating when moving from left -> right in ChromeSelection not updating when moving from left -> right
Version: 3.6.23.0

This has been reproducible in all browsers from CKEditor 3.0

Open replacebycode sample.

  1. Place your cursor in This is some sample text. You are ^using CKEditor., hold the left mouse button and start making the selection forwards the "sample text".
  2. Let go left mouse button when you reach E.g "sam^ple text"

Result: bold button will be activated


  1. Place your cursor in "This ^is some sample text. You are using CKEditor.", hold the left mouse button and start making the selection forwards the "sample text".
  2. Let go left mouse button when you reach E.g "sam^ple text"

Result: bold button will not be activated

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 13 years ago by Henrik Helmø Larsen

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy