Skip to content

Commit 70d1aab

Browse files
authored
fix: Remove contentAttributes from tooltip in Avatar component (#99)
* feat: Update tooltip component in avatar * feat: Update tooltip component in avatar * feat: remove contentAttributes * feat: remove contentAttributes
1 parent 2795450 commit 70d1aab

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/avatar/internal.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,7 @@ export default function InternalAvatar({
104104
{...tooltipAttributes}
105105
style={{ [customCssProps.avatarSize]: `${computedSize}px`, ...getRootStyles(style) }}
106106
>
107-
{showTooltip && tooltipText && (
108-
<Tooltip
109-
className={styles.tooltip}
110-
value={tooltipText}
111-
trackRef={handleRef}
112-
// This is added to ensure tooltip is closed when clicked for consistency with other tooltip usages
113-
contentAttributes={{ onPointerDown: () => setShowTooltip(false) }}
114-
/>
115-
)}
107+
{showTooltip && tooltipText && <Tooltip className={styles.tooltip} value={tooltipText} trackRef={handleRef} />}
116108

117109
{/* aria-hidden is added so that screen readers focus only the parent div */}
118110
{/* when it is not hidden, it becomes unstable in JAWS */}

0 commit comments

Comments
 (0)