reset-scroll.js 396 B

1234567891011121314
  1. /**
  2. * Hack for iOS12 page scroll
  3. * https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
  4. */
  5. import { isIOS as checkIsIOS } from '../validate/system';
  6. import { getRootScrollTop, setRootScrollTop } from './scroll';
  7. var isIOS = checkIsIOS();
  8. /* istanbul ignore next */
  9. export function resetScroll() {
  10. if (isIOS) {
  11. setRootScrollTop(getRootScrollTop());
  12. }
  13. }