Commit 2354c91b by Wee

fix(mobile): fix scroll bug on android device.

parent 3e1890f4
...@@ -233,7 +233,7 @@ class Route extends React.Component { ...@@ -233,7 +233,7 @@ class Route extends React.Component {
const scroll = this.scrollPosBackup const scroll = this.scrollPosBackup
console.log(scroll) console.log(scroll)
if (scroll && this.routeDom) { if (scroll && this.routeDom) {
window.scroll({ top: scroll.top, left: scroll.left }) window.scrollTo(scroll.left, scroll.top)
} }
} }
......
{ {
"name": "react-live-route", "name": "react-live-route",
"version": "1.1.15", "version": "1.1.16",
"description": "A living route for react-router-v4", "description": "A living route for react-router-v4",
"repository": "fi3ework/react-live-route", "repository": "fi3ework/react-live-route",
"license": "MIT", "license": "MIT",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment