From 3e94cb6d76e19ae694a821021122d212c8e2f4f7 Mon Sep 17 00:00:00 2001 From: LaySent Date: Thu, 12 Oct 2017 00:33:59 +0800 Subject: [PATCH] fix: scroll issue in IE (#275) * fix scroll issue in IE * add meta tag for IE browser --- dev.html | 1 + docs/index.html | 1 + src/core/event/scroll.js | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dev.html b/dev.html index f41f01f..a19a0d5 100644 --- a/dev.html +++ b/dev.html @@ -3,6 +3,7 @@ docsify + diff --git a/docs/index.html b/docs/index.html index 28503ba..3f5400e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,6 +4,7 @@ docsify + diff --git a/src/core/event/scroll.js b/src/core/event/scroll.js index bba7aec..0f77efd 100644 --- a/src/core/event/scroll.js +++ b/src/core/event/scroll.js @@ -12,8 +12,8 @@ function scrollTo (el) { if (scroller) scroller.stop() enableScrollEvent = false scroller = new Tweezer({ - start: window.scrollY, - end: el.getBoundingClientRect().top + window.scrollY, + start: window.pageYOffset, + end: el.getBoundingClientRect().top + window.pageYOffset, duration: 500 }) .on('tick', v => window.scrollTo(0, v))