Closed Bug 1345227 Opened 8 years ago Closed 4 years ago

"select" events incorrectly fire when setting selectionStart/End on a text control with an editor

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1677253
Tracking Status
firefox55 --- affected

People

(Reporter: bzbarsky, Unassigned)

References

(Depends on 1 open bug)

Details

Testcase: <input> <script> var i = document.querySelector("input"); i.focus(); i.addEventListener("select", () => console.log("FAIL")); i.selectionStart = i.selectionStart; </script> this logs "FAIL" but should not. See the XXX comment in nsTextEditorState::SetSelectionRange about preserving the current behavior, which is wrong...
Might be easier to do after bug 1345228.
Depends on: 1345228
Depends on: 1343037
Note, there is also the recent spec change, bug 1342605
Ah, I think I was looking at the spec post that change. So this might be a duplicate of bug 1342605, effectively. My patches in bug 1345228 fix this for cases when the editor is not initialized.
Blocks: 1342605
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.