[bugfix] compatible <body /> is the scene of the scrolling container (#3844)

This commit is contained in:
流采
2019-07-15 19:36:21 +08:00
committed by neverland
parent dbe56fd362
commit 511087bc74
6 changed files with 40 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import { createNamespace, isDef, addUnit } from '../utils';
import { getRootScrollTop } from '../utils/dom/scroll';
import { getRootScrollTop, setRootScrollTop } from '../utils/dom/scroll';
import { isIOS } from '../utils/validate/system';
const [createComponent, bem] = createNamespace('stepper');
@@ -160,7 +160,7 @@ export default createComponent({
// https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
/* istanbul ignore next */
if (isIOS()) {
window.scrollTo(0, getRootScrollTop());
setRootScrollTop(getRootScrollTop());
}
},