mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
chore: move utils
This commit is contained in:
16
src-next/utils/dom/reset-scroll.ts
Normal file
16
src-next/utils/dom/reset-scroll.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Hack for iOS12 page scroll
|
||||
* https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
|
||||
*/
|
||||
|
||||
import { isIOS as checkIsIOS } from '../validate/system';
|
||||
import { getRootScrollTop, setRootScrollTop } from './scroll';
|
||||
|
||||
const isIOS = checkIsIOS();
|
||||
|
||||
/* istanbul ignore next */
|
||||
export function resetScroll() {
|
||||
if (isIOS) {
|
||||
setRootScrollTop(getRootScrollTop());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user