Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10510 closed defect (fixed)

[patch] [cla] Editor bad restoreSelection on IE8 when caret is at the end of a line

Reported by: jfcunat Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.5
Component: Editor Version: 1.4.0
Keywords: editor selection Cc:
Blocked By: Blocking:

Description

1)Use test_Editor.html 2) you move the caret at the end of a line inside the second visible editor 3) add bullet via the button plugin --> the bullet is added to the next line. the same happens to insert content, images ...

It seems to be related to a bug on Ie with selection (http://stackoverflow.com/questions/130186/ie-textrange-select-method-not-working-properly)

No idea to correct that. The only way I think about is to disable restoreSelection when selection isCollapsed = true in Editor.js But doing this will not restore caret position when going back to the editor if no selection was done before

Attachments (2)

patch_EditorSelection.txt (1.5 KB) - added by jfcunat 9 years ago.
Editor.js.ie8.patch (1.6 KB) - added by Jared Jurkiewicz 9 years ago.
Potential alternative patch for selection (caret) restore

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by jfcunat

Attachment: patch_EditorSelection.txt added

comment:1 Changed 9 years ago by jfcunat

Proposed patch : disable restoreSelection when using execCommand RichText?. By this way, we keep the previous behaviour to keep selection when focusing editor but not when we use a plugin

comment:2 Changed 9 years ago by bill

Owner: set to Jared Jurkiewicz
Summary: Editor bad restoreSelection on IE8 when caret is at the end of a line[patch] [cla] Editor bad restoreSelection on IE8 when caret is at the end of a line

comment:3 Changed 9 years ago by Jared Jurkiewicz

That may not work. There are plugins that need the caret position restored to function properly. Examples are InsertEntity?, CreateImage?, CreateLink?, and so on. Would need to verify they focus the editor explictly so selections restore.

Changed 9 years ago by Jared Jurkiewicz

Attachment: Editor.js.ie8.patch added

Potential alternative patch for selection (caret) restore

comment:4 Changed 9 years ago by Jared Jurkiewicz

I attached a possible 'alternative' patch to the behavior. But I am not certain I tested it correctly. Can you try it in your environment and see if it works?

comment:5 Changed 9 years ago by Jared Jurkiewicz

Followup.

Originator: Please try the supplied patch and tell me if it resolves the issue you're seeing. Your 'fix' will not work.

comment:6 Changed 9 years ago by Jared Jurkiewicz

Second followup.

Need originator to test alternate fix.

comment:7 Changed 9 years ago by Jared Jurkiewicz

Milestone: 1.5future

Setting milestone to future, as the originator of the defect has thus far been non-responsive and I cannot get verification of the alternative (better), patch

comment:8 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

This may be fixed by #10685, so closing. Please reopen if still an issue.

comment:9 Changed 9 years ago by Jared Jurkiewicz

Milestone: future1.5
Note: See TracTickets for help on using tickets.