mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-22 21:02:03 +00:00
fix: better apple keyboard detection
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
d10c6d3290
commit
30b374ee5d
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -9,4 +9,5 @@ import { isClientSideRendering } from '../../utils/is-client-side-rendering'
|
|||
* Determines if the client is running on a Mac.
|
||||
* This is necessary to e.g. determine different keyboard shortcuts.
|
||||
*/
|
||||
export const isMac: () => boolean = () => isClientSideRendering() && navigator.platform.toLowerCase().includes('mac')
|
||||
export const isMac: () => boolean = () =>
|
||||
isClientSideRendering() && (navigator.platform.startsWith('Mac') || navigator.platform === 'iPhone')
|
||||
|
|
Loading…
Reference in a new issue