mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 02:37:02 +00:00
🎨 The keyboard pops up and then automatically retracts on some HarmonyOS devices https://github.com/siyuan-note/siyuan/issues/17100
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
@@ -4,8 +4,8 @@ export let keyboardLockUntil = 0;
|
||||
|
||||
export const callMobileAppShowKeyboard = () => {
|
||||
// 某些机型(比如鸿蒙 Pura X)在弹起键盘后会立即触发 activeBlur 导致键盘被关闭,所以在主动唤起键盘时锁定一段时间,禁止 activeBlur 关闭键盘
|
||||
// 每次主动唤起键盘时,锁定接下来的 200ms 不允许通过 activeBlur 关闭
|
||||
keyboardLockUntil = Date.now() + 200;
|
||||
// 每次主动唤起键盘时,锁定接下来的 500ms 不允许通过 activeBlur 关闭
|
||||
keyboardLockUntil = Date.now() + 500;
|
||||
|
||||
if (window.JSAndroid && window.JSAndroid.showKeyboard) {
|
||||
window.JSAndroid.showKeyboard();
|
||||
|
||||
Reference in New Issue
Block a user