Ticket #8441 (confirmed Bug)

Opened 3 years ago

Last modified 19 months ago

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 3 years 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

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 19 months ago by j.swiderski (previous) (diff)

comment:2 Changed 3 years 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.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy