fix(event): has no effect on a FF mobile browser, fixed #67
This commit is contained in:
parent
19b66904fb
commit
0ff36c22bb
2 changed files with 10 additions and 1 deletions
|
|
@ -1,8 +1,15 @@
|
||||||
## 2.3.0
|
## 2.3.0
|
||||||
|
|
||||||
> 2017-02-11
|
> 2017-02-11
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
- feat(src): add alias feature
|
- feat(src): add alias feature
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
- fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67
|
||||||
|
|
||||||
|
|
||||||
## 2.2.1
|
## 2.2.1
|
||||||
|
|
||||||
> 2017-02-11
|
> 2017-02-11
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,10 @@ export function bindToggle (dom) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const scrollingElement = document.scrollingElement || document.documentElement
|
||||||
|
|
||||||
export function scroll2Top (offset = 0) {
|
export function scroll2Top (offset = 0) {
|
||||||
document.body.scrollTop = offset === true ? 0 : Number(offset)
|
scrollingElement.scrollTop = offset === true ? 0 : Number(offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sticky () {
|
export function sticky () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue