safari 调用隐藏fileInput

在safari上,用自定义按钮调用隐藏fileInput,注意点

1. event listener中,不要 return false
2. 不要使用display:none,可使用 opacity:0,height:0,width:0等
3. 调用按钮,即自定义按钮可能要添加 cursor:pointer

出处:https://stackoverflow.com/questions/32708496/safari-on-ios-9-does-not-trigger-click-event-on-hidden-input-file

posted @ 2016-03-17 18:25  全玉  阅读(366)  评论(0编辑  收藏  举报