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:
@@ -907,7 +907,10 @@ JX.install('DiffChangeset', {
|
||||
return;
|
||||
}
|
||||
|
||||
e.prevent();
|
||||
// NOTE: Don't prevent or kill the event. If the user has text selected,
|
||||
// clicking a header should clear the selection (and dismiss any inline
|
||||
// context menu, if one exists) as clicking elsewhere in the document
|
||||
// normally would.
|
||||
|
||||
if (this._isSelected) {
|
||||
this.getChangesetList().selectChangeset(null);
|
||||
|
||||
Reference in New Issue
Block a user