mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
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:
@@ -2,11 +2,16 @@ import { createIdentifier } from '@blocksuite/global/di';
|
||||
import type { ReadonlySignal } from '@preact/signals-core';
|
||||
|
||||
export interface VirtualKeyboardProvider {
|
||||
show: () => void;
|
||||
hide: () => void;
|
||||
readonly visible$: ReadonlySignal<boolean>;
|
||||
readonly height$: ReadonlySignal<number>;
|
||||
}
|
||||
|
||||
export const VirtualKeyboardProvider =
|
||||
createIdentifier<VirtualKeyboardProvider>('VirtualKeyboardProvider');
|
||||
export interface VirtualKeyboardProviderWithAction
|
||||
extends VirtualKeyboardProvider {
|
||||
show: () => void;
|
||||
hide: () => void;
|
||||
}
|
||||
|
||||
export const VirtualKeyboardProvider = createIdentifier<
|
||||
VirtualKeyboardProvider | VirtualKeyboardProviderWithAction
|
||||
>('VirtualKeyboardProvider');
|
||||
|
||||
Reference in New Issue
Block a user