2

I actually using monaco-editor in my Angular project.

I'm using the blur event to validate the code the user has entered.

I'm wondering what blur should I used between

onDidBlurEditorText

onDidBlurEditorWidget

is it something related to use the zoom button or the popup content ?

From the documentation https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.icodeeditor.html#ondidblureditortext I cannot understand what is the "widget" ot "text" for monaco-editor

Jerome2606
  • 933
  • 20
  • 42

1 Answers1

1

If you have a widget up, like Peek Definition, here are some scenarios that can happen:

From     | To      | Event
---------|---------|---------
Editor   | Outside | Text, Widget
Widget   | Outside | Widget
Editor   | Widget  | Text
Widget   | Editor  | none

Going with onDidBlurEditorText is probably what you want, unless you're keen on having it validate when you go from widget to editor.

Benny Hinrichs
  • 1,393
  • 9
  • 17