search

Home  >  Q&A  >  body text

javascript - trigger('click') fails in react componentDidMount

componentDidMount can get the real Dom, but trigger('click') still fails. Is there anyone who can solve it?

仅有的幸福仅有的幸福2747 days ago561

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-05-19 10:39:43

    I tested input text, $('').focus is valid, but input file is invalid. The problem should be that the browser has security restrictions.
    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.

    reply
    0
  • Cancelreply