Right click to delete across paragraphs in Firefox results in no model transaction. This in turn results in model corruption and inconsistent behavior.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Handle right-click-delete in Firefox programmatically | VisualEditor/VisualEditor | master | +29 -8 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | dchan | T230323 Use MutationObservers to detect structural changes | |||
Open | None | T230325 Make each ve.ce.ContentBranchNode track its own most recently rendered state | |||
Open | None | T220629 Right click to delete across paragraphs in Firefox results in no model transaction |
Event Timeline
Comment Actions
Deleted text is supported by resolving T230325 . Deleted DOM nodes need T230323 (which does not fix deleted text).
Steps to reproduce:
- In VE standalone in Firefox, edit <p>abc</p><p>def</p> .
- Select from c to f inclusive, with the selection focus after f.
- Right-click on the selection, and choose Delete.
Behaviour in master:
- In the DOM, the 'c' is deleted, as is the <p>def</p>. However, in the model, nothing is deleted.
Behaviour with T230325 resolved (i.e. https://gerrit.wikimedia.org/r/759510 ):
- In the DOM, the 'c' is deleted, as is the <p>def</p>. In the model, the 'c' is deleted, but the <p>def</p> is not.
Comment Actions
Change #1020858 had a related patch set uploaded (by Esanders; author: Esanders):
[VisualEditor/VisualEditor@master] Handle right-click-delete in Firefox programmatically
Comment Actions
We should continue with the patches to use MutationObserver, but we can also just intercept the deleteContentBackward input event when there is a selection, and execute the delete action.