fix: button tooltip should not show on showing image preview (#8224)
when showing image preview in modal, the following code
660060a765/packages/react/focus-scope/src/FocusScope.tsx (L143) will find the first tabbable element and focus, which will trigger the button's tooltip
Adding tabIndex to the image to fix this issue
This commit is contained in:
@@ -308,6 +308,7 @@ const ImagePreviewModalImpl = ({
|
|||||||
data-testid="image-content"
|
data-testid="image-content"
|
||||||
src={url}
|
src={url}
|
||||||
alt={caption}
|
alt={caption}
|
||||||
|
tabIndex={0}
|
||||||
ref={imageRef}
|
ref={imageRef}
|
||||||
draggable={isZoomedBigger}
|
draggable={isZoomedBigger}
|
||||||
onMouseDown={handleDragStart}
|
onMouseDown={handleDragStart}
|
||||||
|
|||||||
Reference in New Issue
Block a user