Browse Source

fix: Removed ctrl+z undo/redo for links popup for mac in rich text

pull/7046/head
Muhammed Mustafa 10 months ago
parent
commit
b1d8b3689a
  1. 6
      packages/nc-gui/components/cell/RichText/LinkOptions.vue

6
packages/nc-gui/components/cell/RichText/LinkOptions.vue

@ -114,14 +114,16 @@ const onDelete = () => {
}
const handleKeyDown = (e: any) => {
const isCtrlPressed = isMac() ? e.metaKey : e.ctrlKey
// Ctrl + Z/ Meta + Z
if ((e.ctrlKey || e.metaKey) && e.key === 'z') {
if (isCtrlPressed && e.key === 'z') {
e.preventDefault()
editor.value.commands.undo()
}
// Ctrl + Shift + Z/ Meta + Shift + Z
if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.key === 'z') {
if (isCtrlPressed && e.shiftKey && e.key === 'z') {
e.preventDefault()
editor.value.commands.redo()
}

Loading…
Cancel
Save