File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 31
31
aria-selected ={active ? ' true' : ' false' }
32
32
tabindex ={active || forceAccessible ? ' 0' : ' -1' }
33
33
{href }
34
- on:click ={() => instance && instance . handleClick () }
34
+ on:click ={handleClick }
35
35
{...internalAttrs }
36
36
{...exclude ($$restProps , [' content$' , ' tabIndicator$' ])}
37
37
>
84
84
import type { TabIndicatorComponentDev } from ' @smui/tab-indicator' ;
85
85
import TabIndicator from ' @smui/tab-indicator' ;
86
86
87
- import type { SMUITabAccessor } from ' ./Tab.types.js ' ;
87
+ import type { SMUITabAccessor } from ' ./Tab.types' ;
88
88
89
89
const forwardEvents = forwardEventsBuilder (get_current_component ());
90
90
182
182
};
183
183
});
184
184
185
+ function handleClick(event : PointerEvent ) {
186
+ if (! event .defaultPrevented ) {
187
+ instance ?.handleClick ();
188
+ }
189
+ }
190
+
185
191
function hasClass(className : string ) {
186
192
return className in internalClasses
187
193
? internalClasses [className ]
You can’t perform that action at this time.
0 commit comments