We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 iOS 10+ 中测试发现, <div class="container spa-scroll spa-scroll-y"> 没有添加上 spa-scroll-touch 样式, 因此没有应用上惯性滚动的样式 .spa-scroll-touch {-webkit-overflow-scrolling: touch; }
<div class="container spa-scroll spa-scroll-y">
spa-scroll-touch
.spa-scroll-touch {-webkit-overflow-scrolling: touch; }
查看代码后发现, 是由于对 iOS 大版本号的获取判断有问题
if($.os.ios && parseInt($.os.version.slice(0, 1)) > 5) { $('.spa-scroll', $page).addClass('spa-scroll-touch') }
当 iOS 版本为 10+ 时, 例如 10.2.1, $.os.version.slice(0, 1) 只取第一位数字, 因此得到的版本号是 1, 固然判断就不生效了.
10.2.1
$.os.version.slice(0, 1)
1
因此对 iOS 大版本号的获取应该修改为 parseInt($.os.version.substring(0, $.os.version.indexOf('.')))
parseInt($.os.version.substring(0, $.os.version.indexOf('.')))
The text was updated successfully, but these errors were encountered:
@ufologist 建议直接提交修改
Sorry, something went wrong.
去掉ios大版本号判断,bugfix #46
3ce2605
谢谢 @ufologist 提交bug
No branches or pull requests
在 iOS 10+ 中测试发现,
<div class="container spa-scroll spa-scroll-y">
没有添加上spa-scroll-touch
样式, 因此没有应用上惯性滚动的样式.spa-scroll-touch {-webkit-overflow-scrolling: touch; }
查看代码后发现, 是由于对 iOS 大版本号的获取判断有问题
当 iOS 版本为 10+ 时, 例如
10.2.1
,$.os.version.slice(0, 1)
只取第一位数字, 因此得到的版本号是1
, 固然判断就不生效了.因此对 iOS 大版本号的获取应该修改为
parseInt($.os.version.substring(0, $.os.version.indexOf('.')))
The text was updated successfully, but these errors were encountered: