Open Bug 1620050 Opened 6 years ago Updated 1 month ago

HTMLInputElement undo history lost when moving the DOM node

Categories

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

72 Branch
defect

Tracking

()

People

(Reporter: dev.lukaszpolowczyk, Unassigned)

References

(Depends on 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

Open https://vw36m.csb.app/

  1. Write some in Widget input.
  2. Use Ctrl+Z keyboard shortcut to undo.

Actual results:

I can not undo the first letter.

Expected results:

I should be able to undo.
In Chrome - I can.

I need it for Widget, which moves to the modal version, with extended possibilities. An event beforeinput could solve my problem to some extent, but not in every case.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Reproducible with current Nightly.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: Remembering state of HTMLInputElement Ctrl+Z - ChildNode.after() etc. → HTMLInputElement undo history lost when moving the DOM node
Webcompat Priority: ? → revisit
See Also: → 448784
See Also: → 1339052
Component: DOM: UI Events & Focus Handling → DOM: Editor
Severity: normal → S3
Webcompat Priority: revisit → ---

This appears to work the same in Chrome, so not a compat issue.

(In reply to James Graham [:jgraham] from comment #5)

This appears to work the same in Chrome, so not a compat issue.

So Chrome has changed the way it works, to the way Firefox works?
Because when I started this topic, Chrome worked differently.

This is still reproducible even with the fix of bug 1992288. I believe we should stop recreating TextEditor when the <input>/<textarea> is temporarily disconnected.

You need to log in before you can comment on or make changes to this bug.