mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 10:14:53 -05:00
[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:
committed by
GitHub
parent
45610bae81
commit
78bcac95ed
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user