Page MenuHomePhabricator

Replies with discussion tools get partially deleted when deleting a line break
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable): write an answer using the "reply" button from DiscussionTools extension. Write some text, a line break and then some other text. Delete the line break.

What happens?: A part of the answer after the deleted line break will quietly disappear from preview but will stay visible in the input box. When publishing, the actual answer is the one that was previewed and content is lost.

What should have happened instead?: No part of the answer should vanish.

Other information (browser name/version, screenshots, etc.): Browser: Opera and Opera mobile. I always use the Wikicode , so I do not know if something similar can happen in visual mode.

Event Timeline

Esanders renamed this task from Replys with discussion tools get partly deleted when deleting a line break to Replies with discussion tools get partially deleted when deleting a line break.Thu, Nov 14, 8:11 AM
Esanders added subscribers: dchan, Esanders.

Looks like a mobile backspace bug. Can reproduce in Chrome mobile:

image.png (1×473 px, 93 KB)

Also not specific to DT, happens in all VE instances.

This looks like an issue with Gboard in English (and many other languages, but not all).

Given <p>abc</p><p><CURSOR>def</p>, pressing backspace removes the second paragraph and appends "def" to the first paragraph, firing only input events without the selection focus ever being in the first paragraph.

This doesn't happen in some Gboard languages: instead, pressing backspace fires an actual keydown event with keyCode 8, so our emulated backspace handling can happen.

ppelberg moved this task from Incoming to Doing on the Editing-team (Kanban Board) board.
ppelberg moved this task from Backlog to Triaged on the DiscussionTools board.
ppelberg moved this task from To Triage to Triaged on the VisualEditor board.