Skip to content

Fixing the recursive update of the Editor Lite

Denys Mishunov requested to merge 270095-editor-lite-cursor into master

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

Availability and Testing

Related to #270095 (closed)

Edited by Denys Mishunov

Merge request reports