Skip to content

Commit

Permalink
rever hiding trigger on right click
Browse files Browse the repository at this point in the history
  • Loading branch information
D0m1nos committed Oct 24, 2024
1 parent 2d5b7bd commit 8f40f2d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/renderer/src/components/song/song-item/SongItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const SongItem: Component<SongItemProps> = (props) => {
let item: HTMLDivElement | undefined;
const [localShow, setLocalShow] = createSignal(false);
const [mousePos, setMousePos] = createSignal<[number, number]>([0, 0]);
const [hideTrigger, setHideTrigger] = createSignal(false);

onMount(() => {
if (!item) {
Expand Down Expand Up @@ -63,7 +62,6 @@ const SongItem: Component<SongItemProps> = (props) => {
onClick={(e) => {
e.stopImmediatePropagation();
setLocalShow(false);
setHideTrigger(false);
}}
>
{props.contextMenu}
Expand All @@ -80,7 +78,6 @@ const SongItem: Component<SongItemProps> = (props) => {
onContextMenu={(e) => {
setMousePos([e.clientX, e.clientY]);
setLocalShow(true);
setHideTrigger(true);
}}
>
<SongImage
Expand All @@ -104,7 +101,7 @@ const SongItem: Component<SongItemProps> = (props) => {
<Popover.Trigger
class={twMerge(
"opacity-0 transition-opacity group-hover:opacity-100",
localShow() && !hideTrigger() && "opacity-100",
localShow() && "opacity-100",
)}
>
<EllipsisVerticalIcon />
Expand Down

0 comments on commit 8f40f2d

Please sign in to comment.