When users click headers to select diff UI elements, don't eat the events

Summary: Ref T13513. Currently, clicking inline or changeset headers eats the click events. This doesn't serve any clear purpose, and means these clicks do not clear text selections from the document, which is unusual.

Test Plan:
  - Selected some text in a diff.
  - Clicked a changeset header to select it.
  - Before patch: text selection and context menu were retained.
  - After patch: text selection was cleared and context menu was dismissed.

Maniphest Tasks: T13513

Differential Revision: https://secure.phabricator.com/D21255
This commit is contained in:
epriestley
2020-05-14 11:43:55 -07:00
parent 42f1a95a12
commit b021da71a5
3 changed files with 29 additions and 27 deletions

View File

@@ -1131,9 +1131,8 @@ JX.install('DiffChangesetList', {
return;
}
// The user definitely clicked an inline, so we're going to handle the
// event.
e.kill();
// NOTE: Don't kill or prevent the event. In particular, we want this
// click to clear any text selection as it normally would.
this.selectInline(inline);
},