mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 20:51:20 +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)) {
|
||||
event.preventDefault()
|
||||
|
||||
if (editor.undo) {
|
||||
editor.undo()
|
||||
if (editor.redo) {
|
||||
editor.redo()
|
||||
}
|
||||
|
||||
return
|
||||
@@ -707,8 +707,8 @@ export const Editable = (props: EditableProps) => {
|
||||
if (Hotkeys.isUndo(nativeEvent)) {
|
||||
event.preventDefault()
|
||||
|
||||
if (editor.redo) {
|
||||
editor.redo()
|
||||
if (editor.undo) {
|
||||
editor.undo()
|
||||
}
|
||||
|
||||
return
|
||||
|
Reference in New Issue
Block a user