refactor(editor): always show keyboard toolbar in mobile (#13384)

Close
[AF-2756](https://linear.app/affine-design/issue/AF-2756/激活输入区的时候,展示toolbar,适配不弹虚拟键盘的场景,比如实体键盘)

#### PR Dependency Tree


* **PR #13384** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved virtual keyboard handling by introducing static keyboard
height and app tab safe area tracking for more consistent toolbar
behavior.

* **Bug Fixes**
* Enhanced keyboard visibility detection on Android and iOS, especially
when a physical keyboard is connected.

* **Refactor**
* Simplified and streamlined keyboard toolbar logic, including delayed
panel closing and refined height calculations.
* Removed unused or redundant toolbar closing methods and position
management logic.

* **Style**
* Updated toolbar and panel styles for better positioning and layout
consistency.
  * Adjusted and removed certain mobile-specific padding styles.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


#### PR Dependency Tree


* **PR #13384** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
L-Sun
2025-08-01 09:58:19 +08:00
committed by GitHub
parent cd29028311
commit 4e1f047cf2
11 changed files with 103 additions and 100 deletions

View File

@@ -121,9 +121,9 @@ framework.impl(VirtualKeyboardProvider, {
};
Promise.all([
Keyboard.addListener('keyboardDidShow', info => {
Keyboard.addListener('keyboardWillShow', info => {
callback({
visible: true,
visible: info.keyboardHeight !== 0,
height: info.keyboardHeight,
});
}),