ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.67k stars 2.41k forks source link

should revert - fix(Popup): set pointer-events none while animating #6754

Closed ekko2665 closed 1 month ago

ekko2665 commented 1 month ago

Version of antd-mobile

5.37.1

Operating system and its version

iOS, Others

Browser and its version

eg.IOS Safari 13.1

Sandbox to reproduce

https://github.com/ant-design/ant-design-mobile/pull/6416

What happened?

class name of adm-popup-body, will had a style pointer-events: none, then u can't click content。 why can not ? when user click something animation not end , and there is no action , they will think something wrong

Relevant log output

class name of adm-popup-body, will had a style pointer-events: none,  then u can't click content。
why can not ? when user  click something animation not end , and there is no action ,  they will think something wrong
zombieJ commented 1 month ago

It's by design since some old mobile device user may miss touch the content when animating. Consider user may not keep updating device, we may keep the prevent events. If you are sure not need this, you can:

.adm-popup-body {
  pointer-events: unset !important;
}
liangskyli commented 1 month ago

This should not be rolled back, not just this component. In addition to the style rewriting scheme mentioned above, there is another option to remove the animation,See reduce-motion

import { reduceMotion } from 'antd-mobile'

reduceMotion()
ekko2665 commented 1 month ago

It's by design since some old mobile device user may miss touch the content when animating. Consider user may not keep updating device, we may keep the prevent events. If you are sure not need this, you can:

.adm-popup-body {
  pointer-events: unset !important;
}

dropdown also will happen this problem?