Skip to content

Commit fed5dde

Browse files
Hieriferhuteng
andauthored
fix(fe): correct modal stacking and tabbar UI behavior (#226)
* feat: add tabbar on harmony * feat(fe): add h5 tabbar * fix(fe): tabbar height * fix: code review issue and compile tabbar icon * fix: code review issue * feat: remove useless comment * fix(fe): modal 样式问题 * fix(fe): modal 样式问题 * feat: merge conflicts * feat: change style logic * feat: add tabbar function and style --------- Co-authored-by: huteng <huteng@echo.tech>
1 parent 3ee23bf commit fed5dde

4 files changed

Lines changed: 485 additions & 87 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
export const PRESENT_TRANSITION_MS = 540
22
export const LAUNCH_SCREEN_MIN_MS = PRESENT_TRANSITION_MS + 20
33
export const WAIT_TRANSITION_TIMEOUT_MS = LAUNCH_SCREEN_MIN_MS
4+
5+
/**
6+
* showModal 防点击穿透的延迟窗口(毫秒)
7+
*
8+
* dialog 同步挂载到 DOM 但保持 `pointer-events: none`,
9+
* MODAL_GUARD_MS 之后才加 `.show`、`pointer-events: auto`,让 confirm/cancel 可点。
10+
*
11+
* 这个数字的选择:
12+
* - 浏览器 click 事件 dispatch 本身 < 5ms
13+
* - mobile WebKit 上 mouseup → click 间隔可达 30~80ms(fastclick/dblclick 检测)
14+
* - 人眼"瞬时弹出"感知阈值约 100ms,超过这个值用户能察觉到延迟
15+
* 取 100ms 同时满足"足够覆盖事件链"和"用户感受不到延迟"。
16+
*/
17+
export const MODAL_GUARD_MS = 100

0 commit comments

Comments
 (0)