Page MenuHomePhabricator

Right click to delete across paragraphs in Firefox results in no model transaction
Closed, ResolvedPublic

Description

Right click to delete across paragraphs in Firefox results in no model transaction. This in turn results in model corruption and inconsistent behavior.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@dchan Do you have a MutationObserver task we can link this to?

Deleted text is supported by resolving T230325 . Deleted DOM nodes need T230323 (which does not fix deleted text).

Steps to reproduce:

  1. In VE standalone in Firefox, edit <p>abc</p><p>def</p> .
  2. Select from c to f inclusive, with the selection focus after f.
  3. 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.

Change #1020858 had a related patch set uploaded (by Esanders; author: Esanders):

[VisualEditor/VisualEditor@master] Handle right-click-delete in Firefox programmatically

https://gerrit.wikimedia.org/r/1020858

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.

Change #1020858 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Handle right-click-delete in Firefox programmatically

https://gerrit.wikimedia.org/r/1020858

Ryasmeen claimed this task.
Ryasmeen moved this task from QA to Ready for Sign Off on the Editing-team (Kanban Board) board.
Ryasmeen edited projects, added: Verified; removed: Editing QA.

Change #1060179 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (be8847993)

https://gerrit.wikimedia.org/r/1060179

• matmarex removed a project: Verified.

My bad, this change wasn't actually live when you tested it @Ryasmeen (assuming you tested with MediaWiki and not VE standalone). Probably best to test this again once the submodule update is merged. I'm sorry about that.

Change #1060179 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (be8847993)

https://gerrit.wikimedia.org/r/1060179

My bad, this change wasn't actually live when you tested it @Ryasmeen (assuming you tested with MediaWiki and not VE standalone). Probably best to test this again once the submodule update is merged. I'm sorry about that.

ok...I tested this on Beta cluster not on VE standalone, and it worked for me. Here is a screencapture of how I tested:

@matmarex: Let me know if I am missing something.