mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
Fix bug in isSafari helper method (#42826)
This helper previously returned `true` for me locally in Google Chrome.
This commit is contained in:
parent
11df2e7204
commit
202a6e7d89
@ -3,7 +3,7 @@ export function isChrome(): boolean {
|
||||
}
|
||||
|
||||
export function isSafari(): boolean {
|
||||
return !!window.navigator.userAgent.match(/safari/i)
|
||||
return !!window.navigator.userAgent.match(/safari/i) && !isChrome()
|
||||
}
|
||||
|
||||
export function isFirefox(): boolean {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { isMacPlatform, getBrowserName } from '@sourcegraph/common'
|
||||
import { isMacPlatform, isSafari } from '@sourcegraph/common'
|
||||
|
||||
import { KeyboardShortcut } from '../keyboardShortcuts'
|
||||
|
||||
@ -56,8 +56,7 @@ export const KEYBOARD_SHORTCUTS: KEYBOARD_SHORTCUT_MAPPING = {
|
||||
},
|
||||
fuzzyFinderSymbols: {
|
||||
title: 'Fuzzy find symbols',
|
||||
// NOTE: `isSafari()` returns true in Google Chrome on macOS.
|
||||
keybindings: [{ held: getBrowserName() === 'safari' ? ['Mod', 'Shift'] : ['Mod'], ordered: ['o'] }],
|
||||
keybindings: [{ held: isSafari() ? ['Mod', 'Shift'] : ['Mod'], ordered: ['o'] }],
|
||||
hideInHelp: true,
|
||||
},
|
||||
copyFullQuery: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user