fix: resolve close policy, handler merging and submenu panel props

- Menu forwards the raw close policy and the item resolves item > menu
  (boolean or function) > per-mode default, so action items close by default and
  an explicit single/multiple policy is no longer pre-empted.
- Root popover chains caller handlers with the internal ones for keydown,
  escape, interact-outside, auto focus and animation end; callers run first and
  a prevented event stops the internal logic.
- Submenu panels receive the nested popover's data/style/id/extra events, honour
  isKeyboardDismissDisabled without closing the parent level or a modal, and
  forward shouldCloseOnInteractOutside.
- A standalone Menu provides its own content-attribute channel so the
  accessible name/description land on the real role=menu node.
This commit is contained in:
maoyingjie
2026-10-24 23:42:05 +08:00
parent 53b4639b0e
commit b474a63303
12 changed files with 465 additions and 54 deletions
+4
View File
@@ -67,3 +67,7 @@
新回归加入test:unit显式入口(pnpm test会自动发现);保留本次13项行为和3项类型正例,不删断言/改成接受错误。逐项填R1–R12“实现位置→测试/浏览器证据→文档差异”;同时闭环上节全部能力清单。仅重点浏览器验遮挡/长菜单/子菜单/外部点击/嵌套关闭/长按/焦点/浅深色与RTL,不机械点击所有演示。
集成时不要覆盖其他人的Toast/Table、文档壳层及新批次清单;继续B01独立分支返修,不自行合main/推送,不提前开下一批。未验证的读屏/物理触屏/逐像素明确保留;SSR/水合/Nuxt不作为当前门槛。
## 53b4639返修复核入口
上一份13项探针已通过,Portal遮挡和Modal逐层关闭已在浏览器重验通过;仍有R4/R6/R8/R9未闭环,具体7项回归与证据以 [B01-complete-review-2.md](./B01-complete-review-2.md) 为本轮当前结果。不得仅以原13项通过标记整批通过。