Page MenuHomePhabricator

D10416.id25060.diff
No OneTemporary

D10416.id25060.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => '974635bb',
- 'core.pkg.js' => 'f67c8265',
+ 'core.pkg.js' => '4e529147',
'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '36884139',
'differential.pkg.js' => '73337d1d',
@@ -438,7 +438,7 @@
'rsrc/js/application/uiexample/notification-example.js' => '7a9677fc',
'rsrc/js/core/Busy.js' => '6453c869',
'rsrc/js/core/DragAndDropFileUpload.js' => '8c49f386',
- 'rsrc/js/core/DraggableList.js' => 'bfccc644',
+ 'rsrc/js/core/DraggableList.js' => '98d13594',
'rsrc/js/core/FileUpload.js' => 'a4ae61bf',
'rsrc/js/core/Hovercard.js' => '7e8468ae',
'rsrc/js/core/KeyboardShortcut.js' => '1ae869f2',
@@ -713,7 +713,7 @@
'phabricator-crumbs-view-css' => 'a49339de',
'phabricator-dashboard-css' => 'a2bfdcbf',
'phabricator-drag-and-drop-file-upload' => '8c49f386',
- 'phabricator-draggable-list' => 'bfccc644',
+ 'phabricator-draggable-list' => '98d13594',
'phabricator-fatal-config-template-css' => '25d446d6',
'phabricator-feed-css' => '7bfc6f12',
'phabricator-file-upload' => 'a4ae61bf',
@@ -1437,6 +1437,14 @@
'javelin-dom',
'javelin-reactor-dom',
),
+ '98d13594' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-util',
+ 'javelin-vector',
+ 'javelin-magical-init',
+ ),
'9c2623f4' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1633,14 +1641,6 @@
'javelin-util',
'phabricator-shaped-request',
),
- 'bfccc644' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-util',
- 'javelin-vector',
- 'javelin-magical-init',
- ),
'c4569c05' => array(
'javelin-magical-init',
'javelin-install',
diff --git a/webroot/rsrc/js/core/DraggableList.js b/webroot/rsrc/js/core/DraggableList.js
--- a/webroot/rsrc/js/core/DraggableList.js
+++ b/webroot/rsrc/js/core/DraggableList.js
@@ -21,6 +21,7 @@
JX.DOM.listen(this._root, 'mousedown', sigil, JX.bind(this, this._ondrag));
JX.Stratcom.listen('mousemove', null, JX.bind(this, this._onmove));
+ JX.Stratcom.listen('scroll', null, JX.bind(this, this._onmove));
JX.Stratcom.listen('mouseup', null, JX.bind(this, this._ondrop));
},
@@ -51,6 +52,7 @@
_ghostHandler : null,
_ghostNode : null,
_group : null,
+ _lastMousePosition: null,
getRootNode : function() {
return this._root;
@@ -329,11 +331,24 @@
},
_onmove : function(e) {
+ // We'll get a callback here for "mousemove" (and can determine the
+ // location of the cursor) and also for "scroll" (and can not). If this
+ // is a move, save the mouse position, so if we get a scroll next we can
+ // reuse the known position.
+
+ if (e.getType() == 'mousemove') {
+ this._lastMousePosition = JX.$V(e);
+ }
+
if (!this._dragging) {
return;
}
- var p = JX.$V(e);
+ if (!this._lastMousePosition) {
+ return;
+ }
+
+ var p = JX.$V(this._lastMousePosition.x, this._lastMousePosition.y);
var group = this._group;
var target_list = this._getTargetList(p);

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 30, 11:57 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717205
Default Alt Text
D10416.id25060.diff (3 KB)

Event Timeline