Ant-design-mobile: Toast wont show when Modal is open under iOS

Created on 30 May 2018  ·  4Comments  ·  Source: ant-design/ant-design-mobile

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.10

Environment

iOS 11.3.1

Reproduction link

https://codepen.io/CallMeXYZ/pen/qKBwev?editors=0011

Steps to reproduce

  • open link in iOS
  • click button and click cancel button of modal

What is expected?

show toast

What is actually happening?

toast won't show under iOS

Most helpful comment

这个BUG是Modal与Picker(类似的层组件)共同使用时在Safari中z-index由于translateZ失效引起的,解决方法一个是设置更大的translateZ,

/*
修复Modal与picker共同使用时在Safari中z-index由于translateZ失效问题,
设置am-picker-popup-wrap为translateZ(2px),以大于Modal的translateZ(1px)
*/
.am-picker-popup-wrap {
-webkit-transform: translateZ(2px);
transform: translateZ(2px)
}

可以参看这篇文章:https://www.cnblogs.com/vickyzhang/articles/7073300.html

All 4 comments

me too.

Picker wont show when Modal is open under iOS

toast level must top than modal

这个BUG是Modal与Picker(类似的层组件)共同使用时在Safari中z-index由于translateZ失效引起的,解决方法一个是设置更大的translateZ,

/*
修复Modal与picker共同使用时在Safari中z-index由于translateZ失效问题,
设置am-picker-popup-wrap为translateZ(2px),以大于Modal的translateZ(1px)
*/
.am-picker-popup-wrap {
-webkit-transform: translateZ(2px);
transform: translateZ(2px)
}

可以参看这篇文章:https://www.cnblogs.com/vickyzhang/articles/7073300.html

ref #2653

Was this page helpful?
0 / 5 - 0 ratings