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:
pengx17
2024-09-13 10:11:18 +00:00
parent 6fde967a6d
commit b1e61245ee

View File

@@ -308,6 +308,7 @@ const ImagePreviewModalImpl = ({
data-testid="image-content"
src={url}
alt={caption}
tabIndex={0}
ref={imageRef}
draggable={isZoomedBigger}
onMouseDown={handleDragStart}