Respect native input ownership before canvas keyboard cancellation

This commit is contained in:
2026-11-09 19:33:40 +08:00
parent 9efe6e7c9f
commit fd6c166f4b
8 changed files with 70 additions and 10 deletions
+10
View File
@@ -463,3 +463,13 @@ current records. Frame titles, node titles, text/style/branch/transform controls
use the scoped bridge. Legacy non-headless contexts retain their old interface.
Text grouping now records incarnation and drops obsolete groups. This is separate
from the public explicit-Target action API and gesture lease tokens.
`canvasKeyContext(nativeEvent)` classifies text and overlay ownership using the
composed path, including retargeted shadow inputs, native selects and registered
`data-canvas-overlay-view` placements. Pass it to `routeCanvasKey` with the native
IME state and the event's current `defaultPrevented` value. Window Escape fallback
runs in the bubble phase so target handlers can claim it first; it cancels only
this view's gesture. Style toolbars dismiss their own modes on unclaimed Escape,
while input controls retain priority. The helper needs no browser globals at
module load or when called with non-DOM ports.