-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
picker 组件的蒙层和选择器应该渲染到 body 里面而不是当前上下文 #8586
Comments
taro-bot2
bot
added
F-react
Framework - React
T-h5
Target - 编译到 H5
V-3
Version - 3.x
labels
Jan 26, 2021
大概原因是 swiper 组件中使用的 transform 属性影响到了 picker 组件的 fixed 定位 picker 组件的蒙层渲染到 body 里面的话应该就可以解决这个问题 (似乎使用 custom element 的话,不像 react 有 Portal 这么方便。。。 ) |
ppbl
changed the title
swiper 组件内使用 position: fixed 不能相对窗口定位,看起来像是相对于 swiper 的
picker 组件的蒙层和选择器应该渲染到 body 里面而不是当前上下文
Jan 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
H5
复现仓库
暂无
浏览器版本: chrome 88
使用框架: React
复现步骤
期望结果
picker 正常相对于窗口定位
实际结果
遮罩层被限制在 swiper 里面
原因
swiper 组件内使用了 transform 属性,影响了 picker 组件的 fixed 定位
解决方法
picker 组件的蒙层渲染到 body 里面可以解决此问题
环境信息
The text was updated successfully, but these errors were encountered: