Closed Bug 1473515 Opened Last year Closed Last year
Disable Undo always re-enables undo with unlimited
Bug 1473515 - Make AutoDisableUndo restores enabled state of undo/redo with previous number of maximum transactions
59 bytes, text/x-review-board-request
https://searchfox.org/mozilla-central/rev/6ef785903fee6c0b16a1eab79d722373d940fd78/dom/html/nsTextEditorState.cpp#184 The destructor of AutoDisableUndo always calls EditorBase::EnableUndoRedo() without argument. Then, -1 is used for unlimited undo/redo stack: https://searchfox.org/mozilla-central/rev/6ef785903fee6c0b16a1eab79d722373d940fd78/editor/libeditor/EditorBase.h#415 However, typically, <input> and <textarea> is limited to 1000. https://searchfox.org/mozilla-central/rev/6ef785903fee6c0b16a1eab79d722373d940fd78/dom/html/nsTextEditorState.cpp#1517 https://searchfox.org/mozilla-central/rev/6ef785903fee6c0b16a1eab79d722373d940fd78/dom/html/nsITextControlElement.h#190 So, AutoDisableUndo should store the limitation of undo/redo stack before disabling it.
Comment on attachment 8990008 [details] Bug 1473515 - Make AutoDisableUndo restores enabled state of undo/redo with previous number of maximum transactions https://reviewboard.mozilla.org/r/255030/#review262094
Attachment #8990008 - Flags: review?(m_kato) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/1814ad4986ce Make AutoDisableUndo restores enabled state of undo/redo with previous number of maximum transactions r=m_kato
You need to log in before you can comment on or make changes to this bug.