hide keyboard in iphone safari webapp

后端 未结 9 1865
长情又很酷
长情又很酷 2020-12-13 13:40

I\'m creating a webapp for the iPhone, based in HTML/CSS/JS. I\'m using forms to receive input and pass data to the script, but a problem I\'m encountering is that the keybo

9条回答
  •  既然无缘
    2020-12-13 14:16

    Be sure to set, in CSS:

    body {
      cursor: pointer;
    }
    

    otherwise, your event handler calling document.activeElement.blur() will never get fired. For more info, see: http://www.shdon.com/blog/2013/06/07/why-your-click-events-don-t-work-on-mobile-safari

提交回复
热议问题