mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
[bugfix] compatible <body />
is the scene of the scrolling container (#3844)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user