diff options
author | Henrik Paul <henrik@vaadin.com> | 2014-01-17 09:33:20 +0200 |
---|---|---|
committer | Henrik Paul <henrik@vaadin.com> | 2014-01-23 13:29:03 +0200 |
commit | c1fc86c9a6464f2e0a652a8bf18a20385aa27c10 (patch) | |
tree | ebacf08f2068cde807440c7a35fb6083da8c3198 /client/src | |
parent | d5cfa012ae662b81ab3e61233cfe722526750a28 (diff) | |
download | vaadin-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.java | 8 |
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(); + } } } |