Skip to content

modal 点击黑幕无法隐藏 #576

Closed
@zavven

Description

@zavven

本地环境

  • antd-mobile 版本:0.9.6
  • 操作系统及其版本:macOS sierra 10.12.1
  • 浏览器及其版本:chrome 54.0.2840.98 (64-bit) 开发工具下模拟ios设备,xcode 模拟器

你做了什么?

引入官网的例子:modal对话框,可关闭示例。

你期待的结果是:

点击黑幕,modal对话框隐藏。

实际上的结果:

点击黑幕,对话框没有隐藏。(浏览器正常模式访问没有问题,模拟安卓设备没有问题)

可重现的在线演示

官网上的demo:用chrome的开发者工具模拟ios设备,官网上的demo也无法正常工作。

Activity

changed the title [-]IOS下, modal 点击黑幕无法隐藏。[/-] [+]modal 点击黑幕无法隐藏[/+] on Nov 28, 2016
self-assigned this
on Nov 28, 2016
silentcloud

silentcloud commented on Nov 29, 2016

@silentcloud
Contributor

@zavven 更新到最新版

ibufu

ibufu commented on Dec 5, 2016

@ibufu

version:1.0.0-alpha.26,同样的问题
@silentcloud
直接用rc-dialog是没问题的。
为什么这个bug是ios独有的?好奇。

ghost

ghost commented on Dec 15, 2016

@ghost
"antd-mobile": "^0.9.11"  // 在自己项目下已升级到最新

@warmhug @silentcloud Modal web 在 IOS 下点击蒙层 maskClosable 无法关闭。

demo

ghost

ghost commented on Dec 16, 2016

@ghost

@warmhug 感谢你的回复!就刚刚我尝试 rimraf node_modules, 通过 cnpm 重装,IOS 下还是不行。
demo

"antd-mobile": "^0.9.12"
eclanp

eclanp commented on Jan 17, 2017

@eclanp

我也遇到这个问题,在web页面不开启模拟器可以正常关闭,开启模拟或者直接在手机上测试,就不行。目前测试了iphone5s/iphone6s,都一样不能关闭。

warmhug

warmhug commented on Jan 17, 2017

@warmhug
Contributor

@eclanp @motorguo 确认用了 fastclick ,没用会有问题。

ghost

ghost commented on Jan 17, 2017

@ghost

@warmhug 还要单独引用这个库 fastclick 么?

warmhug

warmhug commented on Jan 17, 2017

@warmhug
Contributor

先再确认下官方 demo 在你们的环境里有没这个问题。

fastclick 正常不是必须的,但现在有些问题还没解决。麻烦先引入 fastclick 、并正确绑定 dom 里,参考下 官方 demo 里 fastclick 用法;再确认下有没能解决你们这个问题。

eclanp

eclanp commented on Jan 17, 2017

@eclanp

@warmhug 引入 react-fastclick后一切正常了。谢谢!

ghost

ghost commented on Jan 17, 2017

@ghost

@warmhug 感谢,明天试下。

warmhug

warmhug commented on Jan 20, 2017

@warmhug
Contributor

注意,不要使用 react-fastclick (有 bug),要用这个 fastclick

ghost

ghost commented on Jan 20, 2017

@ghost

ok

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @silentcloud@warmhug@eclanp@zavven@kpaxqin

      Issue actions

        modal 点击黑幕无法隐藏 · Issue #576 · ant-design/ant-design-mobile