Open Bug 1379584 Opened 7 years ago Updated 1 year ago

Undo menu broken when deleting text with keyboard in a content editable zone.

Categories

(Web Compatibility :: Site Reports, defect, P5)

Desktop
Windows 10

Tracking

(firefox54 affected, firefox56 affected, firefox100 affected, firefox110 affected)

ASSIGNED
Tracking Status
firefox54 --- affected
firefox56 --- affected
firefox100 --- affected
firefox110 --- affected

People

(Reporter: rhubscher, Assigned: denschub)

References

()

Details

(Keywords: webcompat:needs-contact, Whiteboard: [needscontact])

Removing a text with the Delete key in a content editable zone and then trying to Undo with the right click menu doesn't work.

[Step to reproduce]
1. Access https://quilljs.com/playground/
2. Type some text inside
3. Select and remove with your keyboard (either Delete or Backspace)
4. Right click and select the Undo menu.

[Expected behavior]

The deleted text is back on the text area

[Actual behavior]

The Undo menu has no action.

Refs https://github.com/mozilla/notes/issues/114
Did this use to work (ie is this a regression) ?
Component: General → Untriaged
Flags: needinfo?(rhubscher)
Component: Untriaged → Editor
Product: Firefox → Core
I have no idea, it appears to work fine in a textarea though.

Refs: https://github.com/mozilla/notes/issues/114
Flags: needinfo?(rhubscher)
FYI,
UA spoofing seems to fix the problem on Windows10 Nightly56.0a1.
i.e, seting general.useragent.override = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36"
Great thanks, Alice-san.

At least, since this doesn't work on Firefox 54, I don't think that this is recently regression.  We might have to investigate this why this doesn't work.
Error in Browser console:
IndexSizeError: Component returned failure code: 0x80530001 [nsIDocShell.doCommand]  browser-child.js:401
This is site issue.  This editor manages undo transaction by self, not Gecko.  So when using [Ctrl] + [Z], it is handled by javascript, not our transaction manager.

But context menu uses Gecko's transaction manager.  So it doesn't work. (since delete selection isn't into undo stack)

contenteditable cannot turn off undo stack from javascript, if https://github.com/w3c/editing/issues/150 is resolved, undo menu can be turned off.
Priority: -- → P5
This is site bug and there is no spec to turn off undo stack of browser.

If delete selection (step. 3) is handled by browser, undo will work.  But step. 3 is handled by site's JS unfortunately.  So this operation isn't added into our undo stack.
Component: Editor → Desktop
Product: Core → Tech Evangelism
Depends on: 970802
Whiteboard: [needscontact]
Product: Tech Evangelism → Web Compatibility

See bug 1547409. Moving webcompat whiteboard tags to keywords.

I was able to reproduce the issue. The undo menu option does not work:

https://media.giphy.com/media/mXJsMdfvHnGuR02SKb/giphy.gif

Tested with:

Browser / Version: Firefox Nightly 100.0a1 (2022-03-28) (64-bit) / Chrome Version 99.0.4844.84 (Official Build) (64-bit)
Operating System: Windows 10 PRO x64

Assignee: nobody → dschubert
Status: NEW → ASSIGNED
OS: Unspecified → Windows 10
Hardware: Unspecified → Desktop
Severity: normal → S3

The issue is still reproducible.

Tested with:

Browser / Version: Firefox Nightly 110.0a1 (2023-01-12) (64-bit)
Operating System: Windows 10 PRO x64

Notes:

  1. Reproducible regardless of the status of ETP.
  2. Reproducible on the latest build of Firefox Nightly and Release.
  3. Works as expected using Chrome (the whole text is deleted).

Moving this to NeedsDiagnosis for further investigations.

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