@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.

Better fix for autocomplete blur (select on mousedown instead of delaying blur)

Summary: Ref T10163. I would still sometimes not get a replacement after clicking with the delayed blur. This seems to fix the issue more consistently: instead of listening for a click event (which fires after the blur), listen for a mousedown event (which fires before the blur).

Test Plan: Observed consistent selection via mouse locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15032

+11 -17
+8 -8
resources/celerity/map.php
··· 507 507 'rsrc/js/phui/behavior-phui-object-box-tabs.js' => '2bfa2836', 508 508 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 509 509 'rsrc/js/phuix/PHUIXActionView.js' => '8cf6d262', 510 - 'rsrc/js/phuix/PHUIXAutocomplete.js' => '2b735afc', 510 + 'rsrc/js/phuix/PHUIXAutocomplete.js' => '3d6e37cc', 511 511 'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bd4c8dca', 512 512 'rsrc/js/phuix/PHUIXFormControl.js' => '8fba1997', 513 513 'rsrc/js/phuix/PHUIXIconView.js' => 'bff6884b', ··· 836 836 'phui-workpanel-view-css' => 'adec7699', 837 837 'phuix-action-list-view' => 'b5c256b8', 838 838 'phuix-action-view' => '8cf6d262', 839 - 'phuix-autocomplete' => '2b735afc', 839 + 'phuix-autocomplete' => '3d6e37cc', 840 840 'phuix-dropdown-menu' => 'bd4c8dca', 841 841 'phuix-form-control-view' => '8fba1997', 842 842 'phuix-icon-view' => 'bff6884b', ··· 1023 1023 'javelin-install', 1024 1024 'javelin-util', 1025 1025 ), 1026 - '2b735afc' => array( 1027 - 'javelin-install', 1028 - 'javelin-dom', 1029 - 'phuix-icon-view', 1030 - 'phabricator-prefab', 1031 - ), 1032 1026 '2b8de964' => array( 1033 1027 'javelin-install', 1034 1028 'javelin-util', ··· 1085 1079 'javelin-workflow', 1086 1080 'javelin-util', 1087 1081 'javelin-uri', 1082 + ), 1083 + '3d6e37cc' => array( 1084 + 'javelin-install', 1085 + 'javelin-dom', 1086 + 'phuix-icon-view', 1087 + 'phabricator-prefab', 1088 1088 ), 1089 1089 '3ee3408b' => array( 1090 1090 'javelin-behavior',
+3 -9
webroot/rsrc/js/phuix/PHUIXAutocomplete.js
··· 55 55 JX.bind(this, this._update)); 56 56 57 57 var select = JX.bind(this, this._onselect); 58 - JX.DOM.listen(this._getNode(), 'click', 'typeahead-result', select); 58 + JX.DOM.listen(this._getNode(), 'mousedown', 'typeahead-result', select); 59 59 60 60 var device = JX.bind(this, this._ondevice); 61 61 JX.Stratcom.listen('phabricator-device-change', null, device); 62 62 63 - // When the user clicks away from the textarea, deactivate. However, we 64 - // don't want to deactivate if we're blurring because they clicked an 65 - // option in the dropdown, so put a timeout on the deactivation. This 66 - // will let the click run first if they did actually click a result. 67 - var deactivate = JX.bind(this, function() { 68 - setTimeout(JX.bind(this, this._deactivate), 10); 69 - }); 70 - 63 + // When the user clicks away from the textarea, deactivate. 64 + var deactivate = JX.bind(this, this._deactivate); 71 65 JX.DOM.listen(area, 'blur', null, deactivate); 72 66 }, 73 67