问题描述
我有一个使用html5 web应用程序失去三星Galaxy Tab A(Android 7.0)上的输入元素焦点的问题。这似乎是一个问题在Android中,因为在Windows 10或iOS上(虽然resize事件也会在虚拟键盘弹出时触发),但元素不会失去焦点。当调用虚拟键盘时(但不是在手动调整浏览器窗口大小时),Windows 10和iOS显然会抑制这一点。任何人对此有帮助?
这是一个由于 resize()
事件。
$ b您是否尝试过这种类型的调整大小功能:
//什么都不会发生
} else {
//其他调整大小函数
}
});
I have the problem of losing focus on an input element on a Samsung Galaxy Tab A (Android 7.0) with a html5 web application. It seems to be a problem in android, as on windows 10 or iOS (although the resize event is also triggered when the virtual keyboard pops up) the element does not lose focus. Windows 10 and iOS apparently suppress this when the virtual keyboard is called (but not when manually resizing the browser window). Anybody any help on this?
It's an Android issue losing focus due to the resize()
event.
Have you tried something like this for your resize functionality if something is not in focus:
$(window).bind('resize', function() {
if ($("input").is(":focus")) {
// Nothing will happen
} else {
// Other resize functions
}
});
这篇关于当虚拟键盘出现时,Html输入失去了对三星Android的关注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!