Skip to content
New issue

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

ScrollView中scroll-into-view对于H5的兼容性问题 #14032

Closed
wmhh1129 opened this issue Jun 16, 2023 · 5 comments · Fixed by #14555, #14582 or #14586
Closed

ScrollView中scroll-into-view对于H5的兼容性问题 #14032

wmhh1129 opened this issue Jun 16, 2023 · 5 comments · Fixed by #14555, #14582 or #14586
Labels
enhancement New feature or request T-h5 Target - 编译到 H5

Comments

@wmhh1129
Copy link

这个特性解决了什么问题?

1、scrollWithAnimation中传false并没有起到效果
2、scroll-into-view功能,通过查看源码发现,用了浏览器的scrollIntoView事件,但对其参数不支持传入

这个 API 长什么样?

1、期望scrollWithAnimation=false生效
2、scrollIntoView 支持 block 、inline 的传参

@taro-bot2 taro-bot2 bot added the enhancement New feature or request label Jun 16, 2023
@wmhh1129
Copy link
Author

通过查看源码

document.querySelector(`#${selector}`)?.scrollIntoView({
        behavior: 'smooth',
        block: 'center',
        inline: 'start'
      })

这里固定了在浏览器的滚动行为,希望这几个参数可以支持从外部传入

@TheKonka TheKonka added the T-h5 Target - 编译到 H5 label Jun 16, 2023
@ZakaryCode
Copy link
Contributor

版本是?

@promiseLC
Copy link

@ZakaryCode 版本是3.6.8,并且同一个页面存在两个ScrollView时并且同时配置scrollIntoView,其中一个会不生效

@promiseLC
Copy link

在chrome里面不生效ios生效

@ZakaryCode
Copy link
Contributor

通过查看源码

document.querySelector(`#${selector}`)?.scrollIntoView({
        behavior: 'smooth',
        block: 'center',
        inline: 'start'
      })

这里固定了在浏览器的滚动行为,希望这几个参数可以支持从外部传入

根据问题描述,指向 html 组件库,下一版本修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request T-h5 Target - 编译到 H5
Projects
Archived in project
4 participants