Opened 7 years ago

Closed 6 years ago

#7912 closed Bug (fixed)

Enter key does not work properly

Reported by: Lynne Kues Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6.2
Component: UI : Enter Key Version: 3.0
Keywords: IBM Cc: satya_minnekanti@…

Description (last modified by Frederico Caldeira Knabben)

IE8

  1. Load this HTML:
<p>test test<span style="display: none">&nbsp;</span></p>
<p>and this is some more text</p>
<p>test<span style="display: none">&nbsp;&nbsp;&nbsp; </span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
  1. Put cursor at end of third line of text by clicking the mouse.
  2. Press Enter key.

Nothing happens. The cursor does not go to the next line.

Attachments (2)

7912.patch (737 bytes) - added by Garry Yao 6 years ago.
7912_2.patch (3.6 KB) - added by Garry Yao 6 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 7 years ago by Jakub Ś

Status: newconfirmed
Summary: IE - Enter key does not work properlyEnter key does not work properly
Version: 3.4.23.0

This only affects wysiwyg mode but when you switch to source everything is as it should be.

On IE8 and IE9 new paragraphs are added but the cursor doesn't move.

On FF new paragraphs are added but the cursor doesn't move or disappears.

On Webkit if you place the cursor at the end of first line (behind test test) and press enter, cursor will move to second line although new paragraph was made (see the source)

On Opera pressing enter ,when placing cursor behind third or first line, moves the cursor to the beginning of the text.

This has been true from CKEditor 3.0

comment:2 Changed 7 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

comment:3 Changed 7 years ago by Lynne Kues

This is very confusing behavior for our customers. It's not apparent that new lines are being added and it appears that you can't add text to the end of the document.

comment:4 Changed 6 years ago by typeof

It also affects arrow keys. E.g. in the above scenario try pressing the left arrow key instead of enter - we have to actually press it 5 times in order to move the caret one character to the left. And then try to go to the next line using the right arrow key :)

Looks like IE traverses through invisible content (diplay:none) just like through regular one. We can even freely modify this content - if we are "inside of" an invisible element then we can type anything and it'll be changed (we can verify this behavior by switching later to the source view).

A solution for this problem would probably require adjusting caret position, so that it will never be inside of invisible element.

Changed 6 years ago by Garry Yao

Attachment: 7912.patch added

comment:5 Changed 6 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

comment:7 Changed 6 years ago by Frederico Caldeira Knabben

Description: modified (diff)

comment:8 in reply to:  6 Changed 6 years ago by Frederico Caldeira Knabben

Replying to garry.yao:

http://ckeditor.t/tt/7912/1.html

This test is passing to me in both IE8 and IE9 without patch.

comment:9 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

The patch is making no difference to me.

Changed 6 years ago by Garry Yao

Attachment: 7912_2.patch added

comment:10 Changed 6 years ago by Garry Yao

Component: GeneralUI : Enter Key
Status: review_failedreview

comment:11 Changed 6 years ago by Garry Yao

Unfortunately due to an selection system bug in Opera, which prevents us from making the following selection, we're not able to resolve the issue in that browser, new ticket would be opened to track it.

// The following selection is never possible in Opera, browser will redirect cursor to the paragraph above it.
<p>^<span style="display:none">text</span></p>

comment:12 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

We're almost there, but the test is still failing with IE9/Compat. http://ckeditor.t/tt/7912/1.html

It passes with IE9 mode and IE8.

comment:13 Changed 6 years ago by Frederico Caldeira Knabben

Additionally, this one fails with FF4: http://ckeditor.t/tt/4781/1.html

comment:14 in reply to:  12 Changed 6 years ago by Garry Yao

Status: review_failedreview

Replying to fredck:

but the test is still failing with IE9/Compat.

http://ckeditor.t/tt/7912/1.html

IE < 8 doesn't really hide display:none elements thus are free of this bug, excluded from TC now.

Additionally, this one fails with FF4: http://ckeditor.t/tt/4781/1.html

It should be caused by outdated ticket branch, WFM after merged from master.

comment:15 Changed 6 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.2
Status: reviewreview_passed

comment:16 Changed 6 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7242].

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