mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-11 14:42:39 +08:00
Reflect JS view iframe focus state on creation
This commit is contained in:
parent
e92cdd622d
commit
bb86324624
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
// Cleanup
|
||||||
|
|
||||||
const remove = () => {
|
const remove = () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue