Native Undo History

Not a lot changed. See this issue.

It seems there were changes, now ProseMirror listens to beforeinput event and handles historyUndo and historyRedo which works well in Firefox and Chrome? But:

  • It seems it does not work well in Safari (I have not tested this myself).
  • Because of canceling default action of historyUndo, redo menu option is never enabled.
  • It looks (at least in Firefox) that undo menu option is then always available, even if you get to the beginning of the undo stack.

Am I missing something?

1 Like

@mitar what OS are you testing on? There’s no undo for me on Android 14 in either Chrome or Firefox, but it does exist for native text input fields. Webviews appear to be excluded from the native undo option that appears via longpress.

The native undo from the macOS menubar appears to also match the ProseMirror internal undo behavior (perhaps only by chance though?)

@prosed Are you testing on Android or iPhone? On iPhone I would assume this does not work because all browsers are still using Webkit under the hood and it might be it does not support this event.

I have tested on Linux, Firefox and Chromium.

Android, as mentioned.