Opened 9 years ago

Closed 9 years ago

#12893 closed defect (fixed)

Editor: Enter key on blank line jumps to end of content

Reported by: mtyson Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.7
Component: Editor Version: 1.6.1
Keywords: editor, EnterKeyHandling Cc: mtyson@…
Blocked By: Blocking:

Description

This is a high priority one for us.

Basically, when you hit enter when on a blank line, the caret jumps to the end of the editor content.

Verified this occurs with 1.6 codebase, but not 1.5.

Only occurs if EnterKeyHandling? is active. If that plugin is explicitly removed, enter key on blank line is OK.

STEPS: 1) See attached example. 2) Put caret in blank lines between TEST and TEST1. 3) Hit enter key 4) Notice caret jumps to end

NOTE: The attached sample is taken from dojo campus. Only thing changed is added content and switched codebase to 1.6.

Attachments (3)

editor_problem.html (1.8 KB) - added by mtyson 9 years ago.
Sample of enter key problem
12893_EnterKeyHandling.patch (977 bytes) - added by Jared Jurkiewicz 9 years ago.
Patch that seems to resolve the issue. Needed ot check offset and insert before the specific offset.
12893_EnterKeyHandling_2.patch (894 bytes) - added by Jared Jurkiewicz 9 years ago.
Follow-on patch, always insert before the offset node.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by mtyson

Attachment: editor_problem.html added

Sample of enter key problem

comment:1 Changed 9 years ago by bill

Owner: set to Jared Jurkiewicz

Jared, IIRC you did a big cleanup of EnterKeyHandling, maybe this is fallout from that change?

Changed 9 years ago by Jared Jurkiewicz

Patch that seems to resolve the issue. Needed ot check offset and insert before the specific offset.

comment:2 Changed 9 years ago by Jared Jurkiewicz

(In [24816]) Fixing Enter Key Handling. \!strict refs #12893

comment:3 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [24817]) Fixing Enter Key Handling. \!strict fixes #12893

comment:4 Changed 9 years ago by bill

Milestone: tbd1.7

comment:5 Changed 9 years ago by mtyson

Resolution: fixed
Status: closedreopened

This still repros on the first line (if its blank).

To reproduce: 1) Use the sample 2) Put the caret at the beginning of the first line of content 3) Hit enter a couple times, to move the content down 4) put the caret back at the very first line (which is now blank) 5) hit enter. The caret jumps to the end of content.

summary: Basically, hitting enter at the beginning of the editor content when the line is blank still repros the problem.

Changed 9 years ago by Jared Jurkiewicz

Follow-on patch, always insert before the offset node.

comment:6 Changed 9 years ago by Jared Jurkiewicz

(In [24912]) Follow-on EnterKeyHandling? patch \!strict refs #12893

comment:7 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: reopenedclosed

(In [24913]) Follow-on EnterKeyHandling? patch \!strict fixes #12893

Note: See TracTickets for help on using tickets.