aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2020-10-20 13:54:42 +0300
committerGitHub <noreply@github.com>2020-10-20 13:54:42 +0300
commitc490883da61d317cdf1364da5c313c3ca63edcea (patch)
tree8639d9c475ed10735e5ab4d6259938875fb3f738
parentda71d83f94295856c7f8d66aa6debc209d5318d4 (diff)
downloadvaadin-framework-c490883da61d317cdf1364da5c313c3ca63edcea.tar.gz
vaadin-framework-c490883da61d317cdf1364da5c313c3ca63edcea.zip
When a Grid gets scroll-locked, cancel the scrollInProgress handler. (#12116) (#12127)
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.
-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;
+ }
}
}