mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 12:41:44 +02:00
fix: undoing and redoing are switched (#3363)
This commit is contained in:
committed by
Ian Storm Taylor
parent
3ffd73cd7d
commit
e54b07eba8
@@ -697,8 +697,8 @@ export const Editable = (props: EditableProps) => {
|
|||||||
if (Hotkeys.isRedo(nativeEvent)) {
|
if (Hotkeys.isRedo(nativeEvent)) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
if (editor.undo) {
|
if (editor.redo) {
|
||||||
editor.undo()
|
editor.redo()
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -707,8 +707,8 @@ export const Editable = (props: EditableProps) => {
|
|||||||
if (Hotkeys.isUndo(nativeEvent)) {
|
if (Hotkeys.isUndo(nativeEvent)) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
if (editor.redo) {
|
if (editor.undo) {
|
||||||
editor.redo()
|
editor.undo()
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user