Ticket #1034 (closed Bug: fixed)
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
- Insert an image in the middle of some text (a smiley, for example).
- Click on the image to select it.
- 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:2 Changed 6 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 6 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.

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.