summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorHenrik Paul <henrik@vaadin.com>2014-01-16 10:49:59 +0200
committerLeif Åstrand <leif@vaadin.com>2014-01-16 08:56:48 +0000
commitd5cfa012ae662b81ab3e61233cfe722526750a28 (patch)
tree9b19c79e9ff722a9cf5e679befb4b67bfa3dde0e /client
parent534ea587d5c7bd238d3754da6d1711716a1ed617 (diff)
downloadvaadin-framework-d5cfa012ae662b81ab3e61233cfe722526750a28.tar.gz
vaadin-framework-d5cfa012ae662b81ab3e61233cfe722526750a28.zip
Makes IE8 use the correct property in scroll event object
Change-Id: Ida17ddc9675ab276f29d5fed9cef9cec567e0eae
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/grid/Escalator.java8
-rw-r--r--client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java5
2 files changed, 9 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/grid/Escalator.java b/client/src/com/vaadin/client/ui/grid/Escalator.java
index 887db8a758..3ef8dcda31 100644
--- a/client/src/com/vaadin/client/ui/grid/Escalator.java
+++ b/client/src/com/vaadin/client/ui/grid/Escalator.java
@@ -567,15 +567,17 @@ public class Escalator extends Widget {
var hScrollElem = hScroll.@com.vaadin.client.ui.grid.ScrollbarBundle::getElement()();
return $entry(function(e) {
+ var target = e.target || e.srcElement; // IE8 uses e.scrElement
+
// in case the scroll event was native (i.e. scrollbars were dragged, or
// the scrollTop/Left was manually modified), the bundles have old cache
// values. We need to make sure that the caches are kept up to date.
- if (e.target === vScrollElem) {
+ if (target === vScrollElem) {
vScroll.@com.vaadin.client.ui.grid.ScrollbarBundle::updateScrollPosFromDom()();
- } else if (e.target === hScrollElem) {
+ } else if (target === hScrollElem) {
hScroll.@com.vaadin.client.ui.grid.ScrollbarBundle::updateScrollPosFromDom()();
} else {
- $wnd.console.error("unexpected scroll target: "+e.target);
+ $wnd.console.error("unexpected scroll target: "+target);
}
esc.@com.vaadin.client.ui.grid.Escalator::onScroll()();
diff --git a/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java b/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java
index 922daefa5f..dc26d91fa2 100644
--- a/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java
+++ b/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java
@@ -277,7 +277,10 @@ abstract class ScrollbarBundle {
* @return the new scroll position in pixels
*/
public final int getScrollPos() {
- assert internalGetScrollPos() == scrollPos : "calculated scroll position did not match the actual scroll position";
+ assert internalGetScrollPos() == scrollPos : "calculated scroll position ("
+ + scrollPos
+ + ") did not match the DOM element scroll position ("
+ + internalGetScrollPos() + ")";
return scrollPos;
}