You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while focused on a hidden div in the document. The nextID tracks a pointer into the internal undo stack. The code to do this is in markup.js in the Undoer class.
Version 0.5.1 works properly on Big Sur. As you "do" actions, you can see that the Undo menu option in the Edit menu is enabled, because the execCommand('insertText') runs and pushes the change to the div's content onto the native undo stack. Once the Undo and/or Redo are enabled, then the standard hot-keys (⌘Z and ⇧⌘Z) work which in turn invoke the undo operation in the MarkupEditor.
In Ventura, the same code executes, but the native undo stack is not changed. The Undo and Redo never get enabled in the Edit as you invoke operations on the document, and therefore neither the menu or hot-keys work for Undo/Redo.
Editing operations that don't have to do with MarkupEditor actions (e.g., type some text then undo) work properly in both versions. Only the MarkupEditor operations (think: things that are exposed via the MarkupToolbar) are impacted.
FWIW, the undo/redo tests work properly because the invoke the operations queued in the internal undo stack.
In a sad bit of irony, this is one of the very few places where the MarkupEditor uses the deprecated and browser-dependent execCommand.
The text was updated successfully, but these errors were encountered:
This issue turns out to be specific to Mac Catalyst as of MacOS 13 (Ventura), as discussed in #76. However, a fix to use an input element rather than a contenteditable div within the Undoer works on Mac Catalyst on Ventura and earlier versions.
When you "do" an action (e.g., bold, indent, etc) in the MarkupEditor, a change is pushed on the native undo stack by executing:
while focused on a hidden div in the document. The nextID tracks a pointer into the internal undo stack. The code to do this is in
markup.js
in the Undoer class.Version 0.5.1 works properly on Big Sur. As you "do" actions, you can see that the
Undo
menu option in theEdit
menu is enabled, because theexecCommand('insertText')
runs and pushes the change to the div's content onto the native undo stack. Once theUndo
and/orRedo
are enabled, then the standard hot-keys (⌘Z and ⇧⌘Z) work which in turn invoke the undo operation in the MarkupEditor.In Ventura, the same code executes, but the native undo stack is not changed. The
Undo
andRedo
never get enabled in theEdit
as you invoke operations on the document, and therefore neither the menu or hot-keys work for Undo/Redo.Editing operations that don't have to do with MarkupEditor actions (e.g., type some text then undo) work properly in both versions. Only the MarkupEditor operations (think: things that are exposed via the
MarkupToolbar
) are impacted.FWIW, the undo/redo tests work properly because the invoke the operations queued in the internal undo stack.
In a sad bit of irony, this is one of the very few places where the MarkupEditor uses the deprecated and browser-dependent
execCommand
.The text was updated successfully, but these errors were encountered: