iOS 7 Safari: OS locks up for 4 seconds when clicking/focusing on a HTML input

前端 未结 13 608
不思量自难忘°
不思量自难忘° 2020-12-07 19:36

UPDATE: The issue seems to stem from having many select elements on a page. How random is that?

So here\'s the issue. On iOS 7 Safari, when tapping

13条回答
  •  爱一瞬间的悲伤
    2020-12-07 20:01

    For me, this issue was being caused by user inputs being hidden on the page with display:none.

    The workaround I used: instead of hiding inputs with display:none, I used jQuery's detach() method on document ready to 'hide' all the user inputs that were not being used. Then append() the inputs when they were needed.

    That way no inputs had display:none on when the page was first loaded and so no delay occurred on the initial user interaction.

提交回复
热议问题