mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09:01 +08:00
Merge pull request #382 from Aaron3/patch-1
Switch check from !isMac to isWindows for specificity.
This commit is contained in:
commit
df29153dba
@ -15,13 +15,13 @@ export default class History extends Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
keys() {
|
keys() {
|
||||||
const isMac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false
|
const isWindows = typeof navigator !== 'undefined' ? /Win/.test(navigator.platform) : false
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'Mod-z': undo,
|
'Mod-z': undo,
|
||||||
'Shift-Mod-z': redo,
|
'Shift-Mod-z': redo,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isMac) {
|
if (isWindows) {
|
||||||
keymap['Mod-y'] = redo
|
keymap['Mod-y'] = redo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user