Skip to content

Commit

Permalink
fix: scroll issue in IE (#275)
Browse files Browse the repository at this point in the history
* fix scroll issue in IE

* add meta tag for IE browser
  • Loading branch information
laysent authored and QingWei-Li committed Oct 11, 2017
1 parent 641e522 commit 3e94cb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>docsify</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/themes/vue.css" title="vue">
<link rel="stylesheet" href="/themes/dark.css" title="dark" disabled>
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<title>docsify</title>
<link rel="icon" href="_media/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages">
<meta name="description" content="A magical documentation generator.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
Expand Down
4 changes: 2 additions & 2 deletions src/core/event/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3e94cb6

Please sign in to comment.