gpt4 book ai didi

ios - Phonegap iOS 键盘隐藏完整应用程序

转载 作者:行者123 更新时间:2023-11-29 12:54:47 24 4
gpt4 key购买 nike

我们正在开发所有输入都来自条形码扫描仪的应用程序,我们绝不希望弹出 iOS 键盘进行输入。有没有我们可以将其添加为插件的 native 代码?

我们正在使用 phonegap 将 html5 应用程序编译到 iOS 平台。

最佳答案

引用Link1 Link2

The 2nd line will de-focus all input fields, and it relies on jQuery. I found that calling blur() on the single focused textfield didn't always work. Either one of these lines should work independently, but both of them together cannot be stopped!

var hideKeyboard = function() {
document.activeElement.blur();
$("input").blur();
};

关于ios - Phonegap iOS 键盘隐藏完整应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21428544/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com