Skip to content

Commit 9bc8702

Browse files
committed
fix: for non editable elements drag drop while auto scrolling is causing lots of redundant calls
1 parent 426217f commit 9bc8702

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,7 @@ function RemoteFunctions(config = {}) {
15541554
}
15551555

15561556
if (!isElementEditable(target) || target === window._currentDraggedElement) {
1557+
if (_isAutoScrolling) { return; }
15571558
// if direct detection fails, we try to find a nearby valid target
15581559
target = _findNearestValidTarget(event.clientX, event.clientY);
15591560
if (!target) {
@@ -1626,6 +1627,8 @@ function RemoteFunctions(config = {}) {
16261627
}
16271628

16281629
if (!isElementEditable(target) || target === window._currentDraggedElement) {
1630+
if (_isAutoScrolling) { return; }
1631+
16291632
// if direct detection fails, we try to find a nearby valid target
16301633
target = _findNearestValidTarget(event.clientX, event.clientY);
16311634
}

0 commit comments

Comments
 (0)