File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
gui/src/components/commons Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -344,9 +344,13 @@ export function DrawerTooltip({
344344 elem . classList . add ( classNames ( 'animate-pulse' ) ) ;
345345 elem . classList . add ( classNames ( 'scale-[110%]' ) ) ;
346346 elem . classList . add ( classNames ( 'duration-500' ) ) ;
347- touchTimeout . current = setTimeout ( ( ) => {
347+ if ( elem . hasAttribute ( 'disabled' ) ) {
348348 open ( ) ;
349- } , TOOLTIP_DELAY ) as unknown as number ;
349+ } else {
350+ touchTimeout . current = setTimeout ( ( ) => {
351+ open ( ) ;
352+ } , TOOLTIP_DELAY ) as unknown as number ;
353+ }
350354 }
351355 } ;
352356
@@ -359,7 +363,14 @@ export function DrawerTooltip({
359363 }
360364 } ;
361365
362- const touchEnd = ( ) => {
366+ const touchEnd = ( e : MouseEvent | TouchEvent ) => {
367+ if (
368+ e . currentTarget instanceof HTMLButtonElement &&
369+ e . currentTarget . hasAttribute ( 'disabled' )
370+ ) {
371+ e . preventDefault ( ) ;
372+ return ;
373+ }
363374 if ( Date . now ( ) - touchTimestamp . current < TOOLTIP_DELAY ) {
364375 clearTimeout ( touchTimeout . current ) ;
365376 close ( ) ;
You can’t perform that action at this time.
0 commit comments