Skip to content

[BUG] document.activeElement.blur() can not blur the currently focused editor #548

@dengkunli

Description

@dengkunli

Calling document.activeElement.blur() can not blur the currently focused editor, can reproduce directly on monaco website.

For example, in Monaco webview Hello World example,

window.e = monaco.editor.create(document.getElementById("container"), {
	value: "function hello() {\n\talert('Hello world!');\n}",
	language: "javascript"
});

then open devtools and type in the console:

e.focus()

after seeing the cursor blinking

document.activeElement.blur()

then the editor is not blurred and the cursor is still blinking. calling e.isFocused() will return true as well.


Monaco v0.9.0

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions