mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 20:00:17 +01: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:
parent
c2895ac69f
commit
0d6c17cfcf
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue