Opened 17 years ago

Closed 17 years ago

#1034 closed Bug (fixed)

Cursor position is wrong when hitting Enter in a control selection

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


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 (4)

comment:1 Changed 17 years ago by Martin Kou

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 17 years ago by Martin Kou

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

comment:3 Changed 17 years ago by Martin Kou

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 17 years ago by Martin Kou

Resolution: fixed
Status: newclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy