iPad Safari does not fire blur event

前端 未结 2 2086
心在旅途
心在旅途 2021-02-19 01:06

I have an html input text element in my application with jQuery blur event handler:

$(\'#textBox\').blur(function () { console.log(\'blur\'); })
<
2条回答
  •  佛祖请我去吃肉
    2021-02-19 01:34

    Workaround (albeit not recommended): https://codepen.io/kevinfarrugia/pen/rKpRBL

    document.getElementById("container").addEventListener("click", () => {
      document.getElementById("container").focus();
    });
    

提交回复
热议问题