How to determine if a resize event was triggered by soft keyboard in mobile browser?

前端 未结 8 1694
一向
一向 2020-12-29 21:03

There\'s a lot of discussion about the soft keyboard but I haven\'t found a good solution for my problem yet.

I have a resize function like:

$(window         


        
8条回答
  •  离开以前
    2020-12-29 21:29

    The problem is that, if the active element is focused, you can trigger the resize event just by closing the keyboard without altering the focus.. so, the keyboard will hidden but the code will enter into the condition of focus.

提交回复
热议问题