Fixing the recursive update of the Editor Lite
What does this MR do?
Fixes the recursive update that happens in Editor Lite Vue component when one sets its value from the higher level (when resetting the content of the editor for example). In Monaco, the cursor jumps to the beginning of the editor (first char of the first line) after pasting the updated content. In addition, Editor Lite notifies about the changes in the content. These two facts together lead to a scenario where:
graph TB;
A[editor-lite]-- Editor Lite notifies about the changes -->B[some-higher-component]
B[some-higher-component]-- Updates the content for blob internally -->A[editor-lite]
With this MR we do not update Editor Lite's content if the passed content is identical to the one already in the editor.
NOTE: This MR will be ~"Pick into 13.5" to fis the issue introduced in %13.5. Hence no Changelog entry is provided.
Screenshots
Screen_Recording_2020-10-19_at_16.15.34
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Related to #270095 (closed)
Edited by Denys Mishunov