Open
Bug 2017065
Opened 17 hours ago
Updated 2 hours ago
Undo history lost in <textarea> after toggling display: none → display: block
Categories
(Core :: DOM: Editor, defect)
Tracking
()
NEW
| Webcompat Priority | ? |
People
(Reporter: me, Unassigned)
References
(Depends on 2 open bugs)
Details
Attachments
(1 file)
|
347 bytes,
text/html
|
Details |
Steps to Reproduce:
- Open the attached testcase (or save the HTML below to a file and open it in Firefox).
- Type text into the <textarea>.
- Make additional edits so undo history exists.
- Click the "Hide" button (applies display: none).
- Click the "Show" button (restores display: block).
- Press Ctrl+Z (Cmd+Z on macOS).
Actual Results:
Undo does nothing. The previous edit history is lost after the element is hidden and shown again.
Expected Results:
Undo history should be preserved when toggling visibility via CSS (display: none -> display: block), since:
- The DOM node is not removed from the document.
- The value property remains intact.
- Other browsers (Chromium-based) preserve undo history in the same scenario.
| Reporter | ||
Comment 1•17 hours ago
•
|
||
Note: There are a number of closed bugs about this issue, but I believe it's still in need of a fix, given that the same works fine in Chrome, so it's a webcompat issue. Some of them:
| Reporter | ||
Updated•17 hours ago
|
Webcompat Priority: --- → ?
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → Firefox 148
You need to log in
before you can comment on or make changes to this bug.
Description
•