Skip to content

Commit

Permalink
Check OS for which modifier to use
Browse files Browse the repository at this point in the history
  • Loading branch information
ALevansSamsung committed Dec 3, 2024
1 parent 217fa27 commit fc9a426
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/frontend/track_group_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class TrackGroupPanel extends Panel<Attrs> {
m(`.shell[draggable=true]`,
{
onclick: (e: MouseEvent) => {
if (!e.ctrlKey) {
if (!(navigator.userAgent.includes('Mac')? e.metaKey : e.ctrlKey)) {
globals.dispatch(
Actions.clearTrackAndGroupSelection({}));
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/frontend/track_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class TrackShell implements m.ClassComponent<TrackShellAttrs> {
{
class: `${highlightClass} ${dragClass} ${dropClass} ${globals.state.selectedTrackIds.has(attrs.trackState.id)? 'selected': ''}`,
onclick: (e: MouseEvent)=>{
if (!e.ctrlKey) {
if (!(navigator.userAgent.includes('Mac')? e.metaKey : e.ctrlKey)) {
globals.dispatch(
Actions.clearTrackAndGroupSelection({}));
}
Expand Down

0 comments on commit fc9a426

Please sign in to comment.