Skip to content

Commit

Permalink
fix: changes rundown-tab selection from onClick to onMouseDown
Browse files Browse the repository at this point in the history
To follow global UX conventions. Try clicking any tabs in any other app to verify the convention.
  • Loading branch information
jesperstarkar committed Apr 16, 2024
1 parent 3b49349 commit b6cc62e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/app/src/react/components/headerBar/tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const Tabs: React.FC<{ onTabDoubleClick: (rundown: any) => void }> = obse
<Tab
id="home"
name="Home"
onClick={() => {
onMouseDown={() => {
guiStore.goToHome()
}}
disableClose={true}
Expand All @@ -63,7 +63,7 @@ export const Tabs: React.FC<{ onTabDoubleClick: (rundown: any) => void }> = obse
id={rundown.rundownId}
name={rundown.name}
active={isThisSelected}
onClick={() => handleSelect(rundown.rundownId)}
onMouseDown={() => handleSelect(rundown.rundownId)}
onDoubleClick={() => props.onTabDoubleClick(rundown)}
// eslint-disable-next-line @typescript-eslint/no-misused-promises
onClose={async () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/react/components/headerBar/tabs/tab/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Tab: React.FC<{
id: string
name: string
active?: boolean
onClick: () => void
onMouseDown: () => void
onDoubleClick?: () => void
onClose?: (id: string) => void
disableClose?: boolean
Expand All @@ -21,7 +21,7 @@ export const Tab: React.FC<{
active: props.active,
})}
title="Double-click to edit"
onClick={props.onClick}
onMouseDown={props.onMouseDown}
onDoubleClick={props.onDoubleClick}
>
{props.icon && <div className="icon">{props.icon}</div>}
Expand Down

0 comments on commit b6cc62e

Please sign in to comment.