Extending reversed selection into previous <input> node moves both anchor and focus nodes

NEW
Unassigned

Status

()

Core
Selection
2 years ago
2 years ago

People

(Reporter: capella, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
As noted in bug 1265750, what surprised us most wasn't that during a |selection->Modify("extend", "backward", "character")| call, the focus node shifted to the anonymous #text node, but that the anchor node also was moved.

Using the testcase fiddle [0], it appears both selection nodes are moved to the end (offset 2) of the #text.

Chrome doesn't move the anchor in this case, though interestingly, the focus offset is moved to |7| which I can't explain.


[0] https://jsfiddle.net/yLr3sttk/
You need to log in before you can comment on or make changes to this bug.