mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-14 16:01:13 +03:00
remove workarounds for radix pointer events issues on dropdown and context menus
This commit is contained in:
parent
39411d061f
commit
1b6047abf3
@ -266,7 +266,7 @@ export function ExportCard({
|
|||||||
)}
|
)}
|
||||||
{!exportedRecording.in_progress && !selectionMode && (
|
{!exportedRecording.in_progress && !selectionMode && (
|
||||||
<div className="absolute bottom-2 right-3 z-40">
|
<div className="absolute bottom-2 right-3 z-40">
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<BlurredIconButton
|
<BlurredIconButton
|
||||||
aria-label={t("tooltip.editName")}
|
aria-label={t("tooltip.editName")}
|
||||||
|
|||||||
@ -275,7 +275,7 @@ export default function ReviewCard({
|
|||||||
</AlertDialogFooter>
|
</AlertDialogFooter>
|
||||||
</AlertDialogContent>
|
</AlertDialogContent>
|
||||||
</AlertDialog>
|
</AlertDialog>
|
||||||
<ContextMenu key={event.id} modal={false}>
|
<ContextMenu key={event.id}>
|
||||||
<ContextMenuTrigger asChild>{content}</ContextMenuTrigger>
|
<ContextMenuTrigger asChild>{content}</ContextMenuTrigger>
|
||||||
<ContextMenuContent>
|
<ContextMenuContent>
|
||||||
<ContextMenuItem>
|
<ContextMenuItem>
|
||||||
|
|||||||
@ -592,7 +592,7 @@ export function CameraGroupRow({
|
|||||||
|
|
||||||
{isMobile && !isReadOnly && (
|
{isMobile && !isReadOnly && (
|
||||||
<>
|
<>
|
||||||
<DropdownMenu modal={!isDesktop}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<HiOutlineDotsVertical className="size-5" />
|
<HiOutlineDotsVertical className="size-5" />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
|||||||
@ -136,7 +136,6 @@ export function CamerasFilterButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
modal={false}
|
|
||||||
open={open}
|
open={open}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
|
|||||||
@ -81,7 +81,7 @@ export default function AccountSettings({ className }: AccountSettingsProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container modal={!isDesktop}>
|
<Container>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<Trigger asChild>
|
<Trigger asChild>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
|
|||||||
@ -205,7 +205,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Container modal={!isDesktop}>
|
<Container>
|
||||||
<Trigger>
|
<Trigger>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
|
|||||||
@ -272,7 +272,7 @@ export default function LiveContextMenu({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("w-full", className)}>
|
<div className={cn("w-full", className)}>
|
||||||
<ContextMenu key={camera} modal={false} onOpenChange={handleOpenChange}>
|
<ContextMenu key={camera} onOpenChange={handleOpenChange}>
|
||||||
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
||||||
<ContextMenuContent>
|
<ContextMenuContent>
|
||||||
<div className="flex flex-col items-start gap-1 py-1 pl-2">
|
<div className="flex flex-col items-start gap-1 py-1 pl-2">
|
||||||
|
|||||||
@ -258,13 +258,13 @@ export default function SearchResultActions({
|
|||||||
</AlertDialogContent>
|
</AlertDialogContent>
|
||||||
</AlertDialog>
|
</AlertDialog>
|
||||||
{isContextMenu ? (
|
{isContextMenu ? (
|
||||||
<ContextMenu modal={false}>
|
<ContextMenu>
|
||||||
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
||||||
<ContextMenuContent>{menuItems}</ContextMenuContent>
|
<ContextMenuContent>{menuItems}</ContextMenuContent>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<BlurredIconButton aria-label={t("itemMenu.more.aria")}>
|
<BlurredIconButton aria-label={t("itemMenu.more.aria")}>
|
||||||
<FiMoreVertical className="size-5" />
|
<FiMoreVertical className="size-5" />
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export default function ActionsDropdown({
|
|||||||
const { t } = useTranslation(["components/dialog", "views/replay", "common"]);
|
const { t } = useTranslation(["components/dialog", "views/replay", "common"]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className="flex items-center gap-2"
|
className="flex items-center gap-2"
|
||||||
|
|||||||
@ -130,7 +130,6 @@ export default function ClassificationSelectionDialog({
|
|||||||
</SelectorTrigger>
|
</SelectorTrigger>
|
||||||
<SelectorContent
|
<SelectorContent
|
||||||
className={cn("", isMobile && "mx-1 gap-2 rounded-t-2xl px-4")}
|
className={cn("", isMobile && "mx-1 gap-2 rounded-t-2xl px-4")}
|
||||||
onCloseAutoFocus={(e) => e.preventDefault()}
|
|
||||||
>
|
>
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<DrawerHeader className="sr-only">
|
<DrawerHeader className="sr-only">
|
||||||
|
|||||||
@ -91,7 +91,6 @@ export default function FaceSelectionDialog({
|
|||||||
</SelectorTrigger>
|
</SelectorTrigger>
|
||||||
<SelectorContent
|
<SelectorContent
|
||||||
className={cn("", isMobile && "mx-1 gap-2 rounded-t-2xl px-4")}
|
className={cn("", isMobile && "mx-1 gap-2 rounded-t-2xl px-4")}
|
||||||
onCloseAutoFocus={(e) => e.preventDefault()}
|
|
||||||
>
|
>
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<DrawerHeader className="sr-only">
|
<DrawerHeader className="sr-only">
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import {
|
|||||||
import useKeyboardListener from "@/hooks/use-keyboard-listener";
|
import useKeyboardListener from "@/hooks/use-keyboard-listener";
|
||||||
import { CameraPtzInfo } from "@/types/ptz";
|
import { CameraPtzInfo } from "@/types/ptz";
|
||||||
import React, { useCallback } from "react";
|
import React, { useCallback } from "react";
|
||||||
import { isDesktop, isMobile } from "react-device-detect";
|
import { isMobile } from "react-device-detect";
|
||||||
import { BsThreeDotsVertical } from "react-icons/bs";
|
import { BsThreeDotsVertical } from "react-icons/bs";
|
||||||
import {
|
import {
|
||||||
FaAngleDown,
|
FaAngleDown,
|
||||||
@ -292,7 +292,7 @@ export default function PtzControlPanel({
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{(ptz?.presets?.length ?? 0) > 0 && (
|
{(ptz?.presets?.length ?? 0) > 0 && (
|
||||||
<DropdownMenu modal={!isDesktop}>
|
<DropdownMenu>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
@ -306,10 +306,7 @@ export default function PtzControlPanel({
|
|||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<DropdownMenuContent
|
<DropdownMenuContent className="scrollbar-container max-h-[40dvh] overflow-y-auto">
|
||||||
className="scrollbar-container max-h-[40dvh] overflow-y-auto"
|
|
||||||
onCloseAutoFocus={(e) => e.preventDefault()}
|
|
||||||
>
|
|
||||||
{ptz?.presets.map((preset) => (
|
{ptz?.presets.map((preset) => (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={preset}
|
key={preset}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useCallback, useMemo, useRef, useState } from "react";
|
import { useCallback, useMemo, useRef, useState } from "react";
|
||||||
import { LuFolderX } from "react-icons/lu";
|
import { LuFolderX } from "react-icons/lu";
|
||||||
import { isDesktop, isMobileOnly, isSafari } from "react-device-detect";
|
import { isMobileOnly, isSafari } from "react-device-detect";
|
||||||
import { LuPause, LuPlay } from "react-icons/lu";
|
import { LuPause, LuPlay } from "react-icons/lu";
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
@ -246,7 +246,6 @@ export default function VideoControls({
|
|||||||
)}
|
)}
|
||||||
{features.playbackRate && (
|
{features.playbackRate && (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
modal={!isDesktop}
|
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
if (setControlsOpen) {
|
if (setControlsOpen) {
|
||||||
setControlsOpen(open);
|
setControlsOpen(open);
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import { LuCopy, LuPencil } from "react-icons/lu";
|
|||||||
import { FaDrawPolygon, FaObjectGroup } from "react-icons/fa";
|
import { FaDrawPolygon, FaObjectGroup } from "react-icons/fa";
|
||||||
import { BsPersonBoundingBox } from "react-icons/bs";
|
import { BsPersonBoundingBox } from "react-icons/bs";
|
||||||
import { HiOutlineDotsVertical, HiTrash } from "react-icons/hi";
|
import { HiOutlineDotsVertical, HiTrash } from "react-icons/hi";
|
||||||
import { isDesktop, isMobile } from "react-device-detect";
|
import { isMobile } from "react-device-detect";
|
||||||
import { toRGBColorString } from "@/utils/canvasUtil";
|
import { toRGBColorString } from "@/utils/canvasUtil";
|
||||||
import { Polygon, PolygonType } from "@/types/canvas";
|
import { Polygon, PolygonType } from "@/types/canvas";
|
||||||
import { useCallback, useMemo, useState } from "react";
|
import { useCallback, useMemo, useState } from "react";
|
||||||
@ -524,7 +524,7 @@ export default function PolygonItem({
|
|||||||
|
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<>
|
<>
|
||||||
<DropdownMenu modal={!isDesktop}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<HiOutlineDotsVertical className="size-5" />
|
<HiOutlineDotsVertical className="size-5" />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export function ProfileSectionDropdown({
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
{iconOnly ? (
|
{iconOnly ? (
|
||||||
<Button variant="outline" size="sm">
|
<Button variant="outline" size="sm">
|
||||||
|
|||||||
@ -351,7 +351,6 @@ function TopicFilterButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
modal={false}
|
|
||||||
open={open}
|
open={open}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
if (!open) setCurrentTopics(selectedTopics);
|
if (!open) setCurrentTopics(selectedTopics);
|
||||||
@ -517,7 +516,6 @@ function WsCamerasFilterButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
modal={false}
|
|
||||||
open={open}
|
open={open}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
if (!open) setCurrentCameras(selectedCameras);
|
if (!open) setCurrentCameras(selectedCameras);
|
||||||
|
|||||||
@ -594,7 +594,7 @@ function LibrarySelector({
|
|||||||
forbiddenErrorMessage={t("description.nameCannotContainHash")}
|
forbiddenErrorMessage={t("description.nameCannotContainHash")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button className="flex justify-between smart-capitalize">
|
<Button className="flex justify-between smart-capitalize">
|
||||||
{pageTitle}
|
{pageTitle}
|
||||||
|
|||||||
@ -2018,7 +2018,6 @@ function CameraSelectButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
modal={false}
|
|
||||||
open={open}
|
open={open}
|
||||||
onOpenChange={(open: boolean) => {
|
onOpenChange={(open: boolean) => {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
|
|||||||
@ -342,7 +342,7 @@ function ModelCard({ config, onClick, onUpdate, onDelete }: ModelCardProps) {
|
|||||||
{config.name}
|
{config.name}
|
||||||
</div>
|
</div>
|
||||||
<div className="absolute bottom-2 right-2 z-40">
|
<div className="absolute bottom-2 right-2 z-40">
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild onClick={(e) => e.stopPropagation()}>
|
<DropdownMenuTrigger asChild onClick={(e) => e.stopPropagation()}>
|
||||||
<BlurredIconButton>
|
<BlurredIconButton>
|
||||||
<FiMoreVertical className="size-5 text-white" />
|
<FiMoreVertical className="size-5 text-white" />
|
||||||
|
|||||||
@ -698,7 +698,7 @@ function LibrarySelector({
|
|||||||
regexErrorMessage={t("description.invalidName")}
|
regexErrorMessage={t("description.invalidName")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button className="flex justify-between smart-capitalize">
|
<Button className="flex justify-between smart-capitalize">
|
||||||
{pageTitle}
|
{pageTitle}
|
||||||
|
|||||||
@ -1164,7 +1164,7 @@ function FrigateCameraFeatures({
|
|||||||
loading={isSnapshotLoading}
|
loading={isSnapshotLoading}
|
||||||
/>
|
/>
|
||||||
{!fullscreen && (
|
{!fullscreen && (
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user