mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-08 04:27:47 +08:00
fix handleDocumentFocus error (#778)
* fix handleDocumentFocus error * format correction * Update assets/js/session/index.js Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com> * format correction * Update assets/js/session/index.js Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com> Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
This commit is contained in:
parent
dcafe5c1fe
commit
b92bf3ae7c
1 changed files with 2 additions and 1 deletions
|
@ -461,7 +461,8 @@ function editableElementClicked(event, element) {
|
||||||
* Focuses a focusable element if the user "tab"s anywhere into it.
|
* Focuses a focusable element if the user "tab"s anywhere into it.
|
||||||
*/
|
*/
|
||||||
function handleDocumentFocus(hook, event) {
|
function handleDocumentFocus(hook, event) {
|
||||||
const focusableEl = event.target.closest(`[data-focusable-id]`);
|
const focusableEl =
|
||||||
|
event.target.closest && event.target.closest(`[data-focusable-id]`);
|
||||||
|
|
||||||
if (focusableEl) {
|
if (focusableEl) {
|
||||||
const focusableId = focusableEl.dataset.focusableId;
|
const focusableId = focusableEl.dataset.focusableId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue