1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00
phorge-phorge/webroot/rsrc/js
epriestley 42f1a95a12 Fix a flash of document selection when "oncopy" and "inline on range" behaviors interact
Summary:
Ref T13513. In Safari, do this:

  - view a 2-up diff with content on both sides;
  - select more than one line on the right side; and
  - use your mouse to click "New Inline Comment" in the context menu that pops up.

The mousedown event for the "New Inline Comment" click removes the "copy selection" behavior and creates a flash where both sides of the diff are selected.

This doesn't happen with (most) normal clicks because mouse down on a non-grabbable element clears the document selection.

To avoid this, don't reset the copy selection behavior if the user mouses down on an "<a />". This might not be robust, but seems simple and plausible as a fix.

Test Plan:
  - See above.
  - Before patch: flash of overbroad selection when clicking "New Inline Comment".
  - After patch: no selection flash.

Maniphest Tasks: T13513

Differential Revision: https://secure.phabricator.com/D21254
2020-05-14 14:29:46 -07:00
..
application When cancelling an inline comment edit, exit the edit state after the response arrives 2020-05-14 14:28:20 -07:00
core Fix a flash of document selection when "oncopy" and "inline on range" behaviors interact 2020-05-14 14:29:46 -07:00
phui Glue the new FormationView on top of the older Filetree view in Differential 2020-04-22 08:29:04 -07:00
phuix Allow users to create inline comments by directly selecting text directly 2020-05-13 17:15:18 -07:00