зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1551086 - Do not finish edit action when unbinding the frame from the editing state. r=masayuki
The code here was introduced to fix bug 1053048, but the test there and the test-case there no longer need this, and it's generally unsound to do stuff that changes the state of the input from UnbindFromFrame(). I'll file a new bug for the bogus disabled styling in the test-case in a second. I don't know how to add a test for this (no less because the testcase crashes on debug builds regardless of this patch, see bug 1551192). Differential Revision: https://phabricator.services.mozilla.com/D30914 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d981862102
Коммит
73360e2e5c
|
@ -1930,14 +1930,6 @@ void nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame) {
|
|||
MOZ_ASSERT(aFrame == mBoundFrame, "Unbinding from the wrong frame");
|
||||
NS_ENSURE_TRUE_VOID(!aFrame || aFrame == mBoundFrame);
|
||||
|
||||
// If the editor is modified but nsIEditorObserver::EditAction() hasn't been
|
||||
// called yet, we need to notify it here because editor may be destroyed
|
||||
// before EditAction() is called if selection listener causes flushing layout.
|
||||
if (mTextListener && mTextEditor && mEditorInitialized &&
|
||||
mTextEditor->IsInEditSubAction()) {
|
||||
mTextListener->OnEditActionHandled();
|
||||
}
|
||||
|
||||
// We need to start storing the value outside of the editor if we're not
|
||||
// going to use it anymore, so retrieve it for now.
|
||||
nsAutoString value;
|
||||
|
|
Загрузка…
Ссылка в новой задаче