mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-08 05:04:46 +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
|
||||
|
||||
const remove = () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue