mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 12:43:09 -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
|
||||
|
||||
6
upcoming-release-notes/5362.md
Normal file
6
upcoming-release-notes/5362.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Enhancements
|
||||
authors: [passabilities]
|
||||
---
|
||||
|
||||
Disable sidebar tooltip on touchscreen device. Related to #5352
|
||||
Reference in New Issue
Block a user