File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
gui/src/components/commons Expand file tree Collapse file tree 1 file changed +11
-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,11 @@ export function DrawerTooltip({
359363 }
360364 } ;
361365
362- const touchEnd = ( ) => {
366+ const touchEnd = ( e : MouseEvent | TouchEvent ) => {
367+ if ( e . currentTarget instanceof HTMLButtonElement && e . currentTarget . hasAttribute ( 'disabled' ) ) {
368+ e . preventDefault ( )
369+ return
370+ }
363371 if ( Date . now ( ) - touchTimestamp . current < TOOLTIP_DELAY ) {
364372 clearTimeout ( touchTimeout . current ) ;
365373 close ( ) ;
You can’t perform that action at this time.
0 commit comments