Page MenuHomePhabricator

D10102.id24299.diff
No OneTemporary

D10102.id24299.diff

diff --git a/webroot/rsrc/js/core/behavior-global-drag-and-drop.js b/webroot/rsrc/js/core/behavior-global-drag-and-drop.js
--- a/webroot/rsrc/js/core/behavior-global-drag-and-drop.js
+++ b/webroot/rsrc/js/core/behavior-global-drag-and-drop.js
@@ -15,6 +15,7 @@
var pending = 0;
var files = [];
var errors = false;
+ var dragging = false;
if (config.ifSupported) {
JX.$(config.ifSupported).style.display = '';
@@ -24,15 +25,28 @@
.setURI(config.uploadURI);
drop.listen('didBeginDrag', function() {
+ dragging = true;
JX.Mask.show();
JX.DOM.show(JX.$(config.instructions));
});
drop.listen('didEndDrag', function() {
+ dragging = false;
JX.Mask.hide();
JX.DOM.hide(JX.$(config.instructions));
});
+ JX.DOM.listen(
+ document.documentElement,
+ 'click',
+ null,
+ function () {
+ if (dragging) {
+ drop._updateDepth(-drop._depth);
+ dragging = false;
+ }
+ });
+
drop.listen('willUpload', function() {
pending++;
});

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 30, 11:52 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6723472
Default Alt Text
D10102.id24299.diff (1 KB)

Event Timeline