Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#9459 closed defect (fixed)

Editor: attr('value') corrupts data in editor, losing newlines (EnterKeyHandling BR mode)

Reported by: bill Owned by: bill
Priority: high Milestone: 1.4
Component: Editor Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:


On IE, doing an attr('value') will make the "blank lines" in the edited document disappear.γ€€For example, type:



and then after the attr('value') call the editor (IE, the iframe of the editor) will look like:


Happens using the (turned on by default) EnterKeyHandling plugin, in BR mode, which means that every line of text is a separate <p> and the blank line is a <p>&nbsp;</p>.

Test to be checked in shortly as part of the EnterKeyHandling tests.

Change History (2)

comment:1 Changed 13 years ago by bill

Resolution: β†’ fixed
Status: new β†’ closed

(In [18423]) Make attr('value') not modify the text being shown in the editor.

For now (at least) doing the simple fix of cloning the editor data before running the post-filter transforms (including the problematic EnterKeyHandling (BR) mode). Cloning is safer in any case, albeit less efficient.

Fixes #9459 !strict.

comment:2 Changed 13 years ago by bill

(In [18427]) Initial tests for EnterKeyHandling? plugin in blockNodeForEnter=BR mode on IE.

Includes tests for #9459 and #9462.

Refs #9459, #9460, #9462.

Note: See TracTickets for help on using tickets.