猿问

react componentDidMount中trigger('click')失效

componentDidMount能获取到真实Dom,但trigger('click')还是失效,有没有大神能解决!

SMILET
浏览 364回答 1
1回答

眼眸繁星

我测试input text,$('').focus是有效的,input file无效,问题应该是浏览器做了安全限制。This is due to a security restriction.Most browsers prevent submitting files when the input field didn't receive a direct click or keyboard click event as a security precaution.
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答