reset-scroll.js 462 B

123456789101112131415161718192021
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.resetScroll = resetScroll;
  4. var _system = require("../validate/system");
  5. var _scroll = require("./scroll");
  6. /**
  7. * Hack for iOS12 page scroll
  8. * https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
  9. */
  10. var isIOS = (0, _system.isIOS)();
  11. /* istanbul ignore next */
  12. function resetScroll() {
  13. if (isIOS) {
  14. (0, _scroll.setRootScrollTop)((0, _scroll.getRootScrollTop)());
  15. }
  16. }