Reflect JS view iframe focus state on creation

This commit is contained in:
Jonatan Kłosko 2023-05-31 20:05:20 +02:00
parent e92cdd622d
commit bb86324624

View file

@ -280,6 +280,13 @@ const JSView = {
}
});
// Reflect focus based on whether there is a focused parent, this
// is later synced on "element_focused" events
this.iframe.toggleAttribute(
"data-js-focused",
!!this.el.closest(`[data-js-focused]`)
);
// Cleanup
const remove = () => {