John60676

IOS 系统中键盘弹出来时,点击页面按钮无法触发点击事件

  •  1
     
  •   John60676 · Apr 2, 2018 · 3281 views
    This topic created in 3092 days ago, the information mentioned may be changed or developed.

    最近在做一个前端页面时发现了 ios 上的一个 feature。。 具体说明看下图 6mGcJ.jpg

    简单来说就是在上图这种情况下,“确认按钮” 是无法点击的。必须要按 键盘上的完成,把键盘隐藏后 按钮的点击事件才会正常触发。 这个问题在 stackoverflow 上找到了一个类似的案例(链接)。但他那个解决方法有点暴力。直接监听页面的 touch 事件,就是说我点击页面的任何一个地方都会触发这个事件。 想问问有没有人遇到过这个问题

    1 replies    2018-04-03 15:48:06 +08:00
    John60676
        1
    John60676  
    OP
       Apr 3, 2018
    好了,自己解决了。不要用 position:fixed; 这个东西会引起上述问题。把 fixed 改成 absolute 就好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3691 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 05:11 · PVG 13:11 · LAX 22:11 · JFK 01:11
    ♥ Do have faith in what you're doing.