TODO: fix prompt input undo redo

This commit is contained in:
Qing 2022-09-22 22:47:09 +08:00
parent 5bdc5c1526
commit f947e2aa94

View File

@ -641,9 +641,6 @@ export default function Editor(props: EditorProps) {
// Handle Cmd+Z // Handle Cmd+Z
const undoPredicate = (event: KeyboardEvent) => { const undoPredicate = (event: KeyboardEvent) => {
// TODO: fix prompt input ctrl+z // TODO: fix prompt input ctrl+z
if (isSD) {
return false
}
const isCmdZ = const isCmdZ =
(event.metaKey || event.ctrlKey) && !event.shiftKey && event.key === 'z' (event.metaKey || event.ctrlKey) && !event.shiftKey && event.key === 'z'
// Handle tab switch // Handle tab switch
@ -718,9 +715,6 @@ export default function Editor(props: EditorProps) {
// Handle Cmd+shift+Z // Handle Cmd+shift+Z
const redoPredicate = (event: KeyboardEvent) => { const redoPredicate = (event: KeyboardEvent) => {
if (isSD) {
return false
}
const isCmdZ = const isCmdZ =
(event.metaKey || event.ctrlKey) && (event.metaKey || event.ctrlKey) &&
event.shiftKey && event.shiftKey &&