fix(csr): deliver focus and blur outputs from inside a component
A parent writing @focus on a component tag never heard that component's own input or button take focus. The runtime bound every output-named DOM fallback listener in the bubble phase, and focus and blur do not bubble, so the event fired on the descendant and stopped there. Nothing errored -- the binding simply did nothing. That made a whole class of declared outputs undeliverable: button.focus, button.blur, TextLink.focus, TextLink.blur, WysiwygEditor.focus and WysiwygEditor.blur all advertised events they could never send. The ui ratchet for outputs nothing emits excluded natively-named outputs on the grounds that a native event reaches the root anyway. That holds for click and change, which bubble, and was wrong for focus and blur. Binding those two in the capture phase makes the exclusion honest rather than convenient; the ratchet's comment now says so. Also documents WysiwygEditor as the chrome shell it is: it emits none of its four outputs itself, it forwards whatever the slotted control raises. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
"packages/ui/components/TogglePassword.wrn": "6bd4d9fa82b0c8e80178430d5a42b1b3ec9725fb62be158585f68af9338c901a",
|
||||
"packages/ui/components/TreeView.wrn": "f54d8495730203b923629bcfb167d5ca41236af0101ea2723d33354413555b4b",
|
||||
"packages/ui/components/Typography.wrn": "9676af57f2a937b21f45512e0a290b5bee4a16267fbf404850297d29645d88b5",
|
||||
"packages/ui/components/WysiwygEditor.wrn": "3f9d1765184581e3c1f335769a9f19969917450258bc95ba076980d99f5610b5",
|
||||
"packages/ui/components/WysiwygEditor.wrn": "a858ebd4e6e2672463ba57d4d049176ca1cc98dac32ab3df3638d6a9cdcd0f2d",
|
||||
"packages/ui/components/alert.wrn": "d42287e41b918b1e19962e9462ef203002eb5480acac984f115b711e9dbe663d",
|
||||
"packages/ui/components/avatar.wrn": "8bc705e459b13c7f063c57e1506ce540e50fa8ef9020ae85b6e8b6a3579fc5dc",
|
||||
"packages/ui/components/badge.wrn": "e44e33633fb34e897696cd9290f210108e35a3e2dc3b2a4a367411f45c69a1e1",
|
||||
|
||||
Reference in New Issue
Block a user