fix(ios): can not open keyboard in editor (#11401)

Close [BS-2917](https://linear.app/affine-design/issue/BS-2917/【移动端】ios-唤起键盘的edge-case)

This PR fixes an issue where the keyboard cannot be re-triggered on iOS devices after the keyboard toolbar is hidden or executing some actions in keyboard toolbar.

Key changes:
- Preserve and restore the initial input mode when keyboard toolbar shows/hides
- Improve virtual keyboard service interface to better handle keyboard state
- Add proper cleanup of input mode state in component lifecycle
This commit is contained in:
L-Sun
2025-04-03 01:51:56 +00:00
parent 2026f12daa
commit 5109ceccec
6 changed files with 71 additions and 42 deletions

View File

@@ -12,9 +12,6 @@ import { NbStoreNativeDBApis } from './plugins/nbstore';
bindNativeDBApis(NbStoreNativeDBApis);
// TODO(@L-Sun) Uncomment this when the `show` method implement by `@capacitor/keyboard` in ios
// import './virtual-keyboard';
function mountApp() {
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
const root = document.getElementById('app')!;