A local-first personal finance app
[Enhancement] Disable Sidebar Tooltip on Touchscreen Device (#5362)
passabilities.eth78bcac95ed00
diff --git a/packages/desktop-client/src/components/sidebar/Account.tsx b/packages/desktop-client/src/components/sidebar/Account.tsxindex e082befe9f..d5df8190b5 100644--- a/packages/desktop-client/src/components/sidebar/Account.tsx+++ b/packages/desktop-client/src/components/sidebar/Account.tsx@@ -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 = (<Viewdiff --git a/upcoming-release-notes/5362.md b/upcoming-release-notes/5362.mdnew file mode 100644index 0000000000..2e89eb8037--- /dev/null+++ b/upcoming-release-notes/5362.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [passabilities]+---++Disable sidebar tooltip on touchscreen device. Related to #5352