Ticket #1034 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Cursor position is wrong when hitting Enter in a control selection

Reported by: fredck Owned by:
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: UI : Enter Key Version: SVN (FCKeditor) - Retired
Keywords: Confirmed IE Cc:

Description

With IE, the cursor position is wrong when hitting Enter in a control selection. Ok with Firefox.

Steps to reproduce

  1. Insert an image in the middle of some text (a smiley, for example).
  2. Click on the image to select it.
  3. Hit [Enter].

The paragraph will be correctly split, but the cursor position will not be at the start of the second block. The effect is even worst if adding the image at the end of the paragraph.

It was working properly with version 2.4.3. Tested with IE7.

Change History

comment:1 Changed 7 years ago by martinkou

While I was doing experiments, I found adding that an alert() inside FCKEnterKey.prototype._ExecuteEnterBlock() would solve the problem. This is no way a proper fix, of course, and I was only intended to trace code execution flow by added an alert() there.

However, when an alert() fixes a bug, it usually suggests a synchronization problem. It seems to me that something is setting the cursor position outside of the main JavaScript logic flow.

comment:2 Changed 7 years ago by martinkou

Just to clarify, the alert() has to be added towards the beginning of FCKEnterKey.prototype._ExecuteEnterBlock() to make a difference.

comment:3 Changed 7 years ago by martinkou

I found that if I undo the changes in [618] (not just delete the kludge code), then the cursor position in this bug would go to the correct position. Even deleting the whole kludge code block would send the cursor to the wrong position. So the cursor position in this bug depends on the old kludge.

The old kludge, however, breaks #1005.

comment:4 Changed 7 years ago by martinkou

  • Status changed from new to closed
  • Resolution set to fixed

Fixed with [624]. This is a kludge upon kludge upon kludge, I hope it doesn't break other unexpected things.

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