|
@@ -240,10 +240,11 @@ function useHomeSessionHeaderOpacity(groups: () => HomeSessionGroup[]) {
|
|
|
return { setViewport, setContentRef, setHeaderRef, update, titleOpacity }
|
|
return { setViewport, setContentRef, setHeaderRef, update, titleOpacity }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// Cmd+click on macOS (Ctrl+click elsewhere) opens a session tab in the
|
|
|
|
|
-// background without navigating, matching browser conventions.
|
|
|
|
|
|
|
+// Middle-click or Cmd+click on macOS (Ctrl+click elsewhere) opens a session
|
|
|
|
|
+// tab in the background without navigating, matching browser conventions.
|
|
|
function isBackgroundOpen(event: MouseEvent) {
|
|
function isBackgroundOpen(event: MouseEvent) {
|
|
|
return shouldOpenSessionInBackground({
|
|
return shouldOpenSessionInBackground({
|
|
|
|
|
+ button: event.button,
|
|
|
mac: typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform),
|
|
mac: typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform),
|
|
|
meta: event.metaKey,
|
|
meta: event.metaKey,
|
|
|
ctrl: event.ctrlKey,
|
|
ctrl: event.ctrlKey,
|
|
@@ -1386,7 +1387,15 @@ function HomeSessionSearchResultRow(props: {
|
|
|
group: !!showProjectName(),
|
|
group: !!showProjectName(),
|
|
|
}}
|
|
}}
|
|
|
onMouseEnter={() => props.onHighlight()}
|
|
onMouseEnter={() => props.onHighlight()}
|
|
|
|
|
+ onMouseDown={(event) => {
|
|
|
|
|
+ if (event.button === 1) event.preventDefault()
|
|
|
|
|
+ }}
|
|
|
onClick={(event) => props.onSelect(props.record.session, { background: isBackgroundOpen(event) })}
|
|
onClick={(event) => props.onSelect(props.record.session, { background: isBackgroundOpen(event) })}
|
|
|
|
|
+ onAuxClick={(event) => {
|
|
|
|
|
+ if (!isBackgroundOpen(event)) return
|
|
|
|
|
+ event.preventDefault()
|
|
|
|
|
+ props.onSelect(props.record.session, { background: true })
|
|
|
|
|
+ }}
|
|
|
>
|
|
>
|
|
|
<HomeSessionLeading
|
|
<HomeSessionLeading
|
|
|
project={props.record.project}
|
|
project={props.record.project}
|
|
@@ -1446,7 +1455,15 @@ function HomeSessionRow(props: {
|
|
|
type="button"
|
|
type="button"
|
|
|
data-component="home-session-row"
|
|
data-component="home-session-row"
|
|
|
class={`${HOME_ROW} h-10 min-w-0 flex-1 gap-2 py-3 pl-3 pr-10`}
|
|
class={`${HOME_ROW} h-10 min-w-0 flex-1 gap-2 py-3 pl-3 pr-10`}
|
|
|
|
|
+ onMouseDown={(event) => {
|
|
|
|
|
+ if (event.button === 1) event.preventDefault()
|
|
|
|
|
+ }}
|
|
|
onClick={(event) => props.openSession(props.record.session, { background: isBackgroundOpen(event) })}
|
|
onClick={(event) => props.openSession(props.record.session, { background: isBackgroundOpen(event) })}
|
|
|
|
|
+ onAuxClick={(event) => {
|
|
|
|
|
+ if (!isBackgroundOpen(event)) return
|
|
|
|
|
+ event.preventDefault()
|
|
|
|
|
+ props.openSession(props.record.session, { background: true })
|
|
|
|
|
+ }}
|
|
|
>
|
|
>
|
|
|
<HomeSessionLeading
|
|
<HomeSessionLeading
|
|
|
project={props.record.project}
|
|
project={props.record.project}
|