2

iOS5+ shows next/prev buttons above the keyboard:

enter image description here

Because they change the focused element on the page, they can cause issues with my single page app's layout. The 'tab' key on normal keyboards can cause similar issues, but I can slightly change its functionality to only cycle around the inputs I want with a custom keydown event.

Is there any way to do something similar for those buttons?

4

1 回答 1

1

我不确定你的问题是什么。

我的猜测是,当您使用“上一个”和“下一个”按钮更改焦点时,您的设计会出现问题。而且我还猜测您在输入时单击了这些(尽管很明显)。

当您从一个输入更改为另一个时(使用 tab 键,使用“上一个/下一个”按钮或鼠标),会触发一个模糊事件。

现在,您不要说您正在使用什么库(如果有的话)。但我会说,修复是相似的。

如果您使用 jQuery,请执行以下类似操作:

//Selects all input elements, and binds a anonymous function to them. This function 
//is run when the blur event is triggered, meaning when we change focus to something else
 $("input").on("blur", function () { //Or live, depending on jQuery version

       //Your code here, that I assume you already have
    });
于 2013-10-23T09:44:02.617 回答