Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/components/tables/PatientList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ export const PatientList = forwardRef<PatientListRef, PatientListProps>(({ initi
</div>
)}
<div className={clsx(listLayout === 'table' ? 'block' : 'hidden print:block')}>
<TableDisplay className="print-content hw-autosize-table overflow-x-auto touch-pan-x"/>
<TableDisplay className="print-content hw-autosize-table overflow-x-auto hw-touch-scroll"/>
</div>
{listLayout === 'card' && (
<div className="flex flex-col gap-3 w-full print:hidden">
Expand Down
2 changes: 1 addition & 1 deletion web/components/tables/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ export const TaskList = forwardRef<TaskListRef, TaskListProps>(({ tasks: initial
`}</style>
)}
<div className={clsx('w-full', listLayout === 'table' ? 'block' : 'hidden print:block')}>
<TableDisplay className="print-content hw-autosize-table w-full overflow-x-auto touch-pan-x"/>
<TableDisplay className="print-content hw-autosize-table w-full overflow-x-auto hw-touch-scroll"/>
</div>
{listLayout === 'card' && (
<div className="flex flex-col gap-3 w-full print:hidden">
Expand Down
10 changes: 9 additions & 1 deletion web/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
}

@layer utilities {
.touch-pan-x {
/*
* Enables momentum scrolling for overflow containers (e.g. horizontally
* scrollable tables) without constraining `touch-action`. We intentionally
* avoid Tailwind's `touch-pan-x` utility here: that sets
* `touch-action: pan-x`, which makes the browser treat the element as
* horizontal-only and swallows vertical scroll gestures, breaking vertical
* touch scrolling of the surrounding page on phones and tablets.
*/
.hw-touch-scroll {
-webkit-overflow-scrolling: touch;
}
}
Loading