Hide color picker cursor when confirming color
Hide color picker cursor when confirming color

With the CodeMirror 6 migration, we let the CodeMirror editor handle
the tooltip that is shown on top of the editor. As part of that work,
the integration describes how to show a widget. However, it didn't
implement the hiding of the widget, as `UI.Widget` requires explicit
calls to `.hideWidget()`. Since `ColorPicker.Spectrum.Spectrum` isn't
a web component yet, we need a manual call (web components would
be automatically notified with the `disconnectedCallback`).

Therefore, when the user loses focus or hits the escape key, in both
cases we need to explicitly hide the widget.

R=1cf0af8245a3a17a632a2c73531392b0f9761c76@chromium.org

Fixed: 1295038
Change-Id: If04bae4b17f8a9183f327747430ad16fb4e18c3a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3447412
Auto-Submit: Tim Van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>
Reviewed-by: Yang Guo <1cf0af8245a3a17a632a2c73531392b0f9761c76@chromium.org>
Commit-Queue: Yang Guo <1cf0af8245a3a17a632a2c73531392b0f9761c76@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend