fix code rabbits comment which is valid

This commit is contained in:
Alan Trebugeais
2026-05-10 00:25:19 +02:00
parent 13e3d2bc24
commit 46c7115ba5
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -515,6 +515,7 @@ function LaunchWindowContent() {
<div
ref={recordingWebcamPreviewContainerRef}
className={`${styles.recordingWebcamPreview} ${styles.electronNoDrag} pointer-events-auto`}
data-hud-interactive
title={t("recording.webcam")}
style={{
transform: `translate(${webcamPreviewOffset.x}px, ${webcamPreviewOffset.y}px)`,
@@ -12,6 +12,7 @@ export function useLaunchHudInteractionState({
webcamPreviewDragStartRef: RefObject<unknown>;
}) {
const isMouseOverHudRef = useRef(false);
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
useEffect(() => {
if (openId !== null) {
@@ -31,7 +32,7 @@ export function useLaunchHudInteractionState({
const target = e.target as HTMLElement | null;
if (!target) return;
const isInteractive = !!target.closest(
'.pointer-events-auto, [data-radix-popper-content-wrapper], [class*="menuCard"], [class*="recordingWebcamPreview"]'
".pointer-events-auto, [data-hud-interactive], [data-radix-popper-content-wrapper]"
);
if (isInteractive) {
@@ -69,8 +70,6 @@ export function useLaunchHudInteractionState({
window.electronAPI?.hudOverlaySetIgnoreMouse?.(false);
}, []);
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
const handleHudMouseLeave = useCallback((event: MouseEvent<HTMLDivElement>) => {
const nextTarget = event.relatedTarget;
if (nextTarget instanceof Node && event.currentTarget.contains(nextTarget)) {
@@ -80,6 +80,7 @@ export function HudPopover({
<PopoverTrigger asChild>{trigger}</PopoverTrigger>
<PopoverContent
className={`launch-theme ${styles.menuCard} ${styles.electronNoDrag}`}
data-hud-interactive
unstyled
side="top"
align={align}