Page MenuHomePhabricator

Selection dragging opens context menu on mobile, causing surface to move and breaking drag in Android Chrome
Closed, ResolvedPublic8 Estimated Story Points

Description

After https://gerrit.wikimedia.org/r/#/c/286157 do the following:

  1. Place the cursor outside a link so you get a collapsed selection with a blue dot handle.
  2. Drag the collapsed selection inside a link
  3. Observe the document jumped to keep your link visible after the context appeared.

We considered suppressing the context menu until the user let go of the selection but it turns out that there selection dragging doesn't fire touchstart/end events (just selectionchange) so there is absolutely no way to tell when this happens.

The only possible solution is therefore to ensure that the context menu doesn't interfere with the position of the surface.

Event Timeline

Selection dragging *does* fire touchstart/move/end on Safari, but doesn't on Chrome Android. See http://s.codepen.io/Krinkle/debug/JKYOpV .

Jdforrester-WMF renamed this task from Selection dragging opens context menu on mobile, causing surface to move and breaking drag to Selection dragging opens context menu on mobile, causing surface to move and breaking drag in Android Chrome.Jun 8 2016, 11:40 AM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 8.
Deskana lowered the priority of this task from High to Low.Aug 31 2018, 10:45 AM
marcella raised the priority of this task from Low to High.Apr 29 2019, 1:52 PM

The only possible solution is therefore to ensure that the context menu doesn't interfere with the position of the surface.

Then this would presumably be automatically fixed via T96289: Fix the jump when opening the mobile context.

Shall we pull this on the board to work on @matmarex

JTannerWMF added a subscriber: ppelberg.

I am moving this to stalled due to @matmarex commented in T221328 that:

Problem: When the cursor is placed inside a link annotation (or similar), the editor's context menu under the toolbar opens, and to make space for it, the editing area moves down. If this happens accidentally while the user is trying to precisely place the cursor by dragging it, the cursor may end up in the wrong place, the interaction to place it may be reset, and other visual glitches may occur.

Solution: This will be resolved by the proposed context menu redesign (also known as edit cards: T221247), which among other changes moves the context menu to the bottom of the window. We also considered a more immediate solution to avoid moving the editing area, but it proves surprisingly difficult to do while also avoiding new visual glitches and results in new poor interaction patterns when the context menu covers the editing area, and so we decided to wait for the context menu redesign.

As we have deployed the new edit cards to bn/he/fa we can just QA them on those wikis?

ppelberg claimed this task.