Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

When Firepad is disposed, CodeMirror undo/redo don't return to their original state #376

Open
mig8447 opened this issue Aug 12, 2020 · 0 comments

Comments

@mig8447
Copy link

mig8447 commented Aug 12, 2020

Firepad replaces CodeMirror redo/undo functions with its own handlers for undo and redo but when disposing Firepad, it doesn't return them to their original functions and this causes unexpected behavior in CodeMirror, leaving it in an inconsistent state leading to potential data loss

See https://github.com/FirebaseExtended/firepad/blob/master/lib/rich-text-codemirror-adapter.js#L299 and https://github.com/FirebaseExtended/firepad/blob/master/lib/rich-text-codemirror-adapter.js#L303

When detaching the CodeMirror adapter, those functions should return to their original state. See:

RichTextCodeMirrorAdapter.prototype.detach = function () {

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant