Page MenuHomePhabricator

Don't allow the middle mouse button to start an inline comment

Authored by epriestley on Nov 24 2018, 3:02 PM.



Ref T13216. See PHI985. When you click a line number to start an inline comment, we intend to initiate the action only if you used the left mouse button (desktop) or a touch (tablet/device).

We currently have a not right condition for doing this, but it only excludes right clicks, not middle clicks (or other nth-button clicks). The not right condition was sligthly easier to write, but use an is left condition instead of a not right condition.

Test Plan
  • In Safari, Firefox and Chrome:
    • Used left click to start an inline.
    • Used middle click to do nothing (previously: started an inline).

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Nov 24 2018, 3:02 PM
epriestley marked an inline comment as done.Nov 24 2018, 3:04 PM
epriestley added inline comments.

I'm not 100% this definition works in old IE, but it's the best guess I could dig up from a few minutes of Googling and we don't really support old IE anyway.

epriestley requested review of this revision.Nov 24 2018, 3:04 PM
amckinley accepted this revision.Nov 26 2018, 5:18 PM
This revision is now accepted and ready to land.Nov 26 2018, 5:18 PM
This revision was automatically updated to reflect the committed changes.