Skip to content

Commit 323b88c

Browse files
committed
Fix translation popup visibility
- Change condition from (isClicked && isHovering) to (isClicked || isHovering) - Now popups show on hover OR after clicking - This fixes the issue where clicked words didn't show translations - Critical fix for demo!
1 parent 1ac56f9 commit 323b88c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/components/TextGenerator/TranslatableWord.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const TranslatableWord = memo(
174174
}
175175

176176
const showTranslationPopup =
177-
isClicked && isHovering && shouldTranslate && !isLoading && translation !== null;
177+
(isClicked || isHovering) && shouldTranslate && !isLoading && translation !== null;
178178

179179
const dataTestIdProps = isRelevant ? { 'data-testid': 'feedback-highlight' } : {};
180180

0 commit comments

Comments
 (0)