fix: bug where contextual menu was disappearing quickly
This commit is contained in:
Binary file not shown.
@@ -27,20 +27,19 @@ const UPLOAD_TARGETS: { service: string; label: string }[] = [
|
||||
|
||||
// Lightweight right-click menu for the QSO grids. AG Grid's native context
|
||||
// menu is an Enterprise feature, so this is a plain floating menu driven by
|
||||
// onCellContextMenu. Closes on any outside click, scroll or Escape.
|
||||
// onCellContextMenu. Stays open until the user clicks outside, presses Escape,
|
||||
// or picks a command. (We deliberately do NOT close on scroll/resize: the QSO
|
||||
// list auto-refreshes and AG Grid fires internal scroll events on refresh,
|
||||
// which used to dismiss the menu the instant it appeared.)
|
||||
export function QSOContextMenu({ menu, onClose, onUpdateFromCty, onUpdateFromQRZ, onUpdateFromClublog, onSendTo, onSendRecording, onSendEQSL, onBulkEdit, onExportSelected, onExportFiltered }: Props) {
|
||||
useEffect(() => {
|
||||
if (!menu) return;
|
||||
const close = () => onClose();
|
||||
const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); };
|
||||
window.addEventListener('mousedown', close);
|
||||
window.addEventListener('scroll', close, true);
|
||||
window.addEventListener('resize', close);
|
||||
window.addEventListener('keydown', onKey);
|
||||
return () => {
|
||||
window.removeEventListener('mousedown', close);
|
||||
window.removeEventListener('scroll', close, true);
|
||||
window.removeEventListener('resize', close);
|
||||
window.removeEventListener('keydown', onKey);
|
||||
};
|
||||
}, [menu, onClose]);
|
||||
|
||||
@@ -208,9 +208,9 @@ const TREE: TreeNode[] = [
|
||||
{
|
||||
kind: 'group', label: 'Hardware Configuration', icon: Server, defaultOpen: true, children: [
|
||||
{ kind: 'item', label: 'CAT interface', id: 'cat' },
|
||||
{ kind: 'item', label: 'Rotator', id: 'rotator' },
|
||||
{ kind: 'item', label: 'PstRotator', id: 'rotator' },
|
||||
{ kind: 'item', label: 'CW Keyer', id: 'winkeyer' },
|
||||
{ kind: 'item', label: 'Antenna', id: 'antenna' },
|
||||
{ kind: 'item', label: 'UltraBeam', id: 'antenna' },
|
||||
{ kind: 'item', label: 'Antenna Genius', id: 'antgenius' },
|
||||
{ kind: 'item', label: 'Power Genius', id: 'pgxl' },
|
||||
{ kind: 'item', label: 'Audio devices', id: 'audio' },
|
||||
@@ -235,9 +235,9 @@ const SECTION_LABELS: Partial<Record<SectionId, string>> = {
|
||||
udp: 'UDP integrations',
|
||||
awards: 'Awards',
|
||||
cat: 'CAT interface',
|
||||
rotator: 'Rotator',
|
||||
rotator: 'PstRotator',
|
||||
winkeyer: 'CW Keyer',
|
||||
antenna: 'Antenna',
|
||||
antenna: 'UltraBeam',
|
||||
antgenius: 'Antenna Genius',
|
||||
pgxl: 'Power Genius',
|
||||
audio: 'Audio devices',
|
||||
@@ -2067,7 +2067,6 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
<>
|
||||
<SectionHeader
|
||||
title="Power Genius XL"
|
||||
hint="OpsLog reads the amp's operate state through the FlexRadio, but the fan mode is only reachable on the PowerGenius XL's own TCP control port. Enter its IP to add a fan-mode selector next to Operate in the FlexRadio panel."
|
||||
/>
|
||||
<div className="space-y-4 max-w-xl">
|
||||
<label className="flex items-center gap-2 text-sm cursor-pointer">
|
||||
|
||||
Reference in New Issue
Block a user