Skip to content

Commit

Permalink
Merge pull request #18 from KoStard/master
Browse files Browse the repository at this point in the history
Fix #17
  • Loading branch information
pengx17 authored Feb 21, 2022
2 parents 6819e01 + c943838 commit fc214df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PageTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const Tabs = React.forwardRef<HTMLElement, TabsProps>(
data-dragging={draggingTab != null}
className={`flex items-center h-full px-1`}
style={{ width: "fit-content" }}
// By default middle button click will enter the horizontal scroll mode
onMouseDown={e => { if (e.button === 1) e.preventDefault(); }}
>
{tabs.map((tab) => {
const isActive = isTabEqual(tab, activePage);
Expand Down Expand Up @@ -108,6 +110,7 @@ const Tabs = React.forwardRef<HTMLElement, TabsProps>(
return (
<div
onClick={() => onClickTab(tab)}
onAuxClick={onClose}
onDoubleClick={() => onPinTab(tab)}
onContextMenu={(e) => {
e.preventDefault();
Expand Down

0 comments on commit fc214df

Please sign in to comment.