@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+29 -27
+23 -23
resources/celerity/map.php
··· 13 13 'core.pkg.js' => '845355f4', 14 14 'dark-console.pkg.js' => '187792c2', 15 15 'differential.pkg.css' => 'b042ee8b', 16 - 'differential.pkg.js' => '5d560bda', 16 + 'differential.pkg.js' => 'e0600220', 17 17 'diffusion.pkg.css' => '42c75c37', 18 18 'diffusion.pkg.js' => 'a98c0bf7', 19 19 'maniphest.pkg.css' => '35995d6d', ··· 379 379 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be', 380 380 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9', 381 381 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8', 382 - 'rsrc/js/application/diff/DiffChangeset.js' => 'b6bb0240', 383 - 'rsrc/js/application/diff/DiffChangesetList.js' => '1e8658bb', 382 + 'rsrc/js/application/diff/DiffChangeset.js' => 'd721533b', 383 + 'rsrc/js/application/diff/DiffChangesetList.js' => '8b0eab21', 384 384 'rsrc/js/application/diff/DiffInline.js' => '734d3c33', 385 385 'rsrc/js/application/diff/DiffPathView.js' => '8207abf9', 386 386 'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b', ··· 774 774 'phabricator-darklog' => '3b869402', 775 775 'phabricator-darkmessage' => '26cd4b73', 776 776 'phabricator-dashboard-css' => '5a205b9d', 777 - 'phabricator-diff-changeset' => 'b6bb0240', 778 - 'phabricator-diff-changeset-list' => '1e8658bb', 777 + 'phabricator-diff-changeset' => 'd721533b', 778 + 'phabricator-diff-changeset-list' => '8b0eab21', 779 779 'phabricator-diff-inline' => '734d3c33', 780 780 'phabricator-diff-path-view' => '8207abf9', 781 781 'phabricator-diff-tree-view' => '5d83623b', ··· 1069 1069 'javelin-behavior', 1070 1070 'javelin-dom', 1071 1071 ), 1072 - '1e8658bb' => array( 1073 - 'javelin-install', 1074 - 'phuix-button-view', 1075 - 'phabricator-diff-tree-view', 1076 - ), 1077 1072 '1ff278aa' => array( 1078 1073 'phui-button-css', 1079 1074 ), ··· 1675 1670 'javelin-dom', 1676 1671 'phabricator-draggable-list', 1677 1672 ), 1673 + '8b0eab21' => array( 1674 + 'javelin-install', 1675 + 'phuix-button-view', 1676 + 'phabricator-diff-tree-view', 1677 + ), 1678 1678 '8b5c7d65' => array( 1679 1679 'javelin-behavior', 1680 1680 'javelin-stratcom', ··· 1979 1979 'javelin-stratcom', 1980 1980 'javelin-dom', 1981 1981 ), 1982 - 'b6bb0240' => array( 1983 - 'javelin-dom', 1984 - 'javelin-util', 1985 - 'javelin-stratcom', 1986 - 'javelin-install', 1987 - 'javelin-workflow', 1988 - 'javelin-router', 1989 - 'javelin-behavior-device', 1990 - 'javelin-vector', 1991 - 'phabricator-diff-inline', 1992 - 'phabricator-diff-path-view', 1993 - 'phuix-button-view', 1994 - ), 1995 1982 'b7b73831' => array( 1996 1983 'javelin-behavior', 1997 1984 'javelin-dom', ··· 2102 2089 ), 2103 2090 'd4cc2d2a' => array( 2104 2091 'javelin-install', 2092 + ), 2093 + 'd721533b' => array( 2094 + 'javelin-dom', 2095 + 'javelin-util', 2096 + 'javelin-stratcom', 2097 + 'javelin-install', 2098 + 'javelin-workflow', 2099 + 'javelin-router', 2100 + 'javelin-behavior-device', 2101 + 'javelin-vector', 2102 + 'phabricator-diff-inline', 2103 + 'phabricator-diff-path-view', 2104 + 'phuix-button-view', 2105 2105 ), 2106 2106 'd8a86cfb' => array( 2107 2107 'javelin-behavior',
+4 -1
webroot/rsrc/js/application/diff/DiffChangeset.js
··· 907 907 return; 908 908 } 909 909 910 - e.prevent(); 910 + // NOTE: Don't prevent or kill the event. If the user has text selected, 911 + // clicking a header should clear the selection (and dismiss any inline 912 + // context menu, if one exists) as clicking elsewhere in the document 913 + // normally would. 911 914 912 915 if (this._isSelected) { 913 916 this.getChangesetList().selectChangeset(null);
+2 -3
webroot/rsrc/js/application/diff/DiffChangesetList.js
··· 1131 1131 return; 1132 1132 } 1133 1133 1134 - // The user definitely clicked an inline, so we're going to handle the 1135 - // event. 1136 - e.kill(); 1134 + // NOTE: Don't kill or prevent the event. In particular, we want this 1135 + // click to clear any text selection as it normally would. 1137 1136 1138 1137 this.selectInline(inline); 1139 1138 },