summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2020-10-12 14:42:40 +0300
committerGitHub <noreply@github.com>2020-10-12 14:42:40 +0300
commitb817d61d6ab3f22057a85018a68701cb9ed5473f (patch)
tree057a8ea42b18900b1c85fa5a062194944a97c364 /client/src
parent2c8aa65c72d424c60da57ddb39e09a8cc3b6269a (diff)
downloadvaadin-framework-b817d61d6ab3f22057a85018a68701cb9ed5473f.tar.gz
vaadin-framework-b817d61d6ab3f22057a85018a68701cb9ed5473f.zip
When a Grid gets scroll-locked, cancel the scrollInProgress handler. (#12116)
Otherwise opening a Grid editor can cause ApplicationConnection to get stuck in 'active' state even if no actual scroll position processing is ongoing, which in turn causes TestBench delays when it tries to wait until ApplicationConnection indicates that everything necessary has been processed.
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
index 8042e1b264..122c302f36 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
@@ -790,9 +790,16 @@ public abstract class ScrollbarBundle implements DeferredWorker {
if (!isLocked()) {
scrollPos = newScrollPos;
scrollEventFirer.scheduleEvent();
- } else if (scrollPos != newScrollPos) {
- // we need to actually undo the setting of the scroll.
- internalSetScrollPos(toInt32(scrollPos));
+ } else {
+ if (scrollPos != newScrollPos) {
+ // we need to actually undo the setting of the scroll.
+ internalSetScrollPos(toInt32(scrollPos));
+ }
+ if (scrollInProgress != null) {
+ // cancel the in-progress indicator
+ scrollInProgress.removeHandler();
+ scrollInProgress = null;
+ }
}
}