fix(mobile): incorrect height of keyboard toolbar in ios (#8653)

### What Changes:
- Fix keyboard height calculation with the `KeyboardToolBarConfig.useScreenHeight = true`. More detials in: https://github.com/toeverything/blocksuite/pull/8645
- Add safe bottom padding for shrinked keyboard toolbar
- Add `VirtualKeyboard` polyfill. Close [AF-1573](https://linear.app/affine-design/issue/AF-1573/virtualkeyboard-polyfill-with-capacitor)
  - Since the `@capacitor/keyboard` dose not implement the `Keyboard.show()` method, this polyfill is not enabled now.
This commit is contained in:
L-Sun
2024-11-01 05:48:30 +00:00
parent 10b1f233d9
commit 1973cea035
9 changed files with 198 additions and 5 deletions
@@ -1,4 +1,5 @@
import type { CapacitorConfig } from '@capacitor/cli';
import { KeyboardResize } from '@capacitor/keyboard';
const config: CapacitorConfig = {
appId: 'app.affine.pro',
@@ -17,6 +18,9 @@ const config: CapacitorConfig = {
CapacitorHttp: {
enabled: true,
},
Keyboard: {
resize: KeyboardResize.Native,
},
},
};