Skip to content

Type Editor


Type Editor / @type-editor/selection-util / has-focus-and-selection

has-focus-and-selection

Functions

FunctionDescription

hasFocusAndSelection

Checks if the editor both has focus and contains a selection.

For editable views, this requires the view to have focus. For all views, this checks if a valid selection exists within the editor.