[Enhancement] Disable Sidebar Tooltip on Touchscreen Device (#5362)

* check if device is not touchscreen to show account sidebar tooltip

* release notes
This commit is contained in:
passabilities.eth
2025-07-23 12:34:34 -05:00
committed by GitHub
parent 45610bae81
commit 78bcac95ed
2 changed files with 10 additions and 2 deletions

View File

@@ -114,8 +114,10 @@ export function Account<FieldName extends SheetFields<'account'>>({
const [isEditing, setIsEditing] = useState(false);
const accountNote = useNotes(`account-${account?.id}`);
const canDeviceHover = window.matchMedia('(hover: hover)').matches;
const needsTooltip = !!account?.id && canDeviceHover;
const isTouchDevice =
window.matchMedia('(hover: none)').matches ||
window.matchMedia('(pointer: coarse)').matches;
const needsTooltip = !!account?.id && !isTouchDevice;
const accountRow = (
<View

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [passabilities]
---
Disable sidebar tooltip on touchscreen device. Related to #5352