aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorHenrik Paul <henrik@vaadin.com>2014-01-17 09:33:20 +0200
committerHenrik Paul <henrik@vaadin.com>2014-01-23 13:29:03 +0200
commitc1fc86c9a6464f2e0a652a8bf18a20385aa27c10 (patch)
treeebacf08f2068cde807440c7a35fb6083da8c3198 /client/src
parentd5cfa012ae662b81ab3e61233cfe722526750a28 (diff)
downloadvaadin-framework-c1fc86c9a6464f2e0a652a8bf18a20385aa27c10.tar.gz
vaadin-framework-c1fc86c9a6464f2e0a652a8bf18a20385aa27c10.zip
Only prevent default scroll event in Escalator if scrollbars are visible (#13238)
Change-Id: I03e10d2f7faf7cce70042879125d1d2ba2b4db66
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/ui/grid/Escalator.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/grid/Escalator.java b/client/src/com/vaadin/client/ui/grid/Escalator.java
index 3ef8dcda31..80cb56675a 100644
--- a/client/src/com/vaadin/client/ui/grid/Escalator.java
+++ b/client/src/com/vaadin/client/ui/grid/Escalator.java
@@ -442,7 +442,13 @@ public class Escalator extends Widget {
* TODO: only prevent if not scrolled to end/bottom. Or no? UX team
* needs to decide.
*/
- event.preventDefault();
+ final boolean warrantedYScroll = deltaY != 0
+ && escalator.verticalScrollbar.needsScrollbars();
+ final boolean warrantedXScroll = deltaX != 0
+ && escalator.horizontalScrollbar.needsScrollbars();
+ if (warrantedYScroll || warrantedXScroll) {
+ event.preventDefault();
+ }
}
}