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

Make waving cover files around on boards more reliable

Summary:
Currently, in Safari, if you drag an image onto a board to make it a cover file and then wave it around wildly a lot over differnent cards, it sometimes glitches out a bit and won't drop on them properly.

This appears to be because sequencing and delivery of dragenter/dragleave events isn't always totally ideal.

Instead, just cancel any existing drag when we get a new drag that targets a new drop target.

Test Plan:
- Opened a board with a bunch of cards.
- Dragged a file from my desktop onto the board.
- Waved it around wildly, hovering over many different cards.
- Before patch: sometimes cards under the cursor stopped highlighting properly.
- After patch: behavior seems correct and consistent.

Reviewers: chad

Reviewed By: chad

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

+22 -13
+11 -11
resources/celerity/map.php
··· 11 11 'core.pkg.js' => '808ae845', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', 14 - 'differential.pkg.js' => '6b42b4bc', 14 + 'differential.pkg.js' => 'd0cd0df6', 15 15 'diffusion.pkg.css' => 'f45955ed', 16 16 'diffusion.pkg.js' => '3a9a8bfa', 17 17 'maniphest.pkg.css' => '4845691a', ··· 446 446 'rsrc/js/application/uiexample/gesture-example.js' => '558829c2', 447 447 'rsrc/js/application/uiexample/notification-example.js' => '8ce821c5', 448 448 'rsrc/js/core/Busy.js' => '59a7976a', 449 - 'rsrc/js/core/DragAndDropFileUpload.js' => 'da044194', 449 + 'rsrc/js/core/DragAndDropFileUpload.js' => '81f182b5', 450 450 'rsrc/js/core/DraggableList.js' => '8905523d', 451 451 'rsrc/js/core/FileUpload.js' => '680ea2c8', 452 452 'rsrc/js/core/Hovercard.js' => '1bd28176', ··· 741 741 'phabricator-core-css' => '5b3563c8', 742 742 'phabricator-countdown-css' => 'e7544472', 743 743 'phabricator-dashboard-css' => 'eb458607', 744 - 'phabricator-drag-and-drop-file-upload' => 'da044194', 744 + 'phabricator-drag-and-drop-file-upload' => '81f182b5', 745 745 'phabricator-draggable-list' => '8905523d', 746 746 'phabricator-fatal-config-template-css' => '8e6c6fcd', 747 747 'phabricator-feed-css' => 'ecd4ec57', ··· 1451 1451 'javelin-vector', 1452 1452 'javelin-stratcom', 1453 1453 ), 1454 + '81f182b5' => array( 1455 + 'javelin-install', 1456 + 'javelin-util', 1457 + 'javelin-request', 1458 + 'javelin-dom', 1459 + 'javelin-uri', 1460 + 'phabricator-file-upload', 1461 + ), 1454 1462 '834a1173' => array( 1455 1463 'javelin-behavior', 1456 1464 'javelin-scrollbar', ··· 1889 1897 'javelin-dom', 1890 1898 'javelin-util', 1891 1899 'phabricator-shaped-request', 1892 - ), 1893 - 'da044194' => array( 1894 - 'javelin-install', 1895 - 'javelin-util', 1896 - 'javelin-request', 1897 - 'javelin-dom', 1898 - 'javelin-uri', 1899 - 'phabricator-file-upload', 1900 1900 ), 1901 1901 'dbbf48b6' => array( 1902 1902 'javelin-behavior',
+11 -2
webroot/rsrc/js/core/DragAndDropFileUpload.js
··· 107 107 return; 108 108 } 109 109 110 - if (!this._node && !this._depth) { 111 - this._target = e.getNode(this._sigil); 110 + if (!this._node) { 111 + var target = e.getNode(this._sigil); 112 + if (target !== this._target) { 113 + this._updateDepth(-this._depth); 114 + this._target = target; 115 + } 112 116 } 113 117 114 118 if (contains(this._getTarget(), e.getTarget())) { 115 119 this._updateDepth(1); 116 120 } 121 + 117 122 }); 118 123 119 124 var on_dragleave = JX.bind(this, function(e) { 120 125 if (!this.getIsEnabled()) { 126 + return; 127 + } 128 + 129 + if (!this._getTarget()) { 121 130 return; 122 131 } 123 132