File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
packages/machines/accordion/src Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @zag-js/accordion " : patch
3
+ ---
4
+
5
+ Fix issue in Safari where clicking triggers doesn't show the content as expected.
Original file line number Diff line number Diff line change @@ -105,10 +105,8 @@ export function connect<T extends PropTypes>(
105
105
"data-state" : itemState . expanded ? "open" : "closed" ,
106
106
"data-ownedby" : dom . getRootId ( scope ) ,
107
107
onFocus ( ) {
108
- queueMicrotask ( ( ) => {
109
- if ( itemState . disabled ) return
110
- send ( { type : "TRIGGER.FOCUS" , value } )
111
- } )
108
+ if ( itemState . disabled ) return
109
+ send ( { type : "TRIGGER.FOCUS" , value } )
112
110
} ,
113
111
onBlur ( ) {
114
112
if ( itemState . disabled ) return
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export const machine = createMachine<AccordionSchema>({
24
24
return {
25
25
focusedValue : bindable < string | null > ( ( ) => ( {
26
26
defaultValue : null ,
27
+ sync : true ,
27
28
onChange ( value ) {
28
29
prop ( "onFocusChange" ) ?.( { value } )
29
30
} ,
You can’t perform that action at this time.
0 commit comments