Closed Bug 358033 Opened 15 years ago Closed 3 years ago

Undo transaction doesn't remember focusNode part of the selection

Categories

(Core :: DOM: Editor, defect, P3)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: martijn.martijn, Assigned: m_kato)

Details

Attachments

(2 files, 1 obsolete file)

To reproduce:
- Put some text in a textarea
- Select some text text from right to left/bottom to top
- Pres delete
- Press ctrl-z
- Press the right or left arrow key

Actual result:
The caret appears at the right/bottom side of where the selection was.

Expected result:
The caret should appear at the left/top side of where the selection was.
QA Contact: editor
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Any update on this regression? I'm seeing the issue again. Here's a test case to reproduce:

https://codepen.io/cheng-lee/pen/yqywXa
Assignee: nobody → m_kato
Status: REOPENED → NEW
Priority: -- → P3
Attached file Bug 358033 - Part 2. Add test. r? (obsolete) —
Attachment #8993575 - Attachment is obsolete: true
SelectionState doesn't save and restore current selection's direction.  So the
direction of selection is always default after undoing.

So we should restore direction of selection.
Comment on attachment 8993578 [details]
Bug 358033 - Part 1. Restore direction of Selection. r?masayuki

Masayuki Nakano [:masayuki] (JST, +0900) has approved the revision.

https://phabricator.services.mozilla.com/D2259
Attachment #8993578 - Flags: review+
Comment on attachment 8993588 [details]
Bug 358033 - Part 2. Add test. r?masayuki

Masayuki Nakano [:masayuki] (JST, +0900) has approved the revision.

https://phabricator.services.mozilla.com/D2260
Attachment #8993588 - Flags: review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/69f61d0f8f81
Part 1. Restore direction of Selection. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/69f61d0f8f81
https://hg.mozilla.org/mozilla-central/rev/0bc82dd8d837
Status: NEW → RESOLVED
Closed: 4 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.