Skip to content

Commit

Permalink
remove console log
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Feb 21, 2024
1 parent 0e2364c commit 133b055
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/components/CellInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,9 @@ const InputContextMenu = ({ on_delete, cell_id, run_cell, skip_as_script, runnin
useLayoutEffect(() => {
if (open) {
list_ref.current?.querySelector("button")?.focus()
console.log("forcing focus", list_ref.current?.querySelector("button"))
} else {
console.log("restoring focus", prevously_focused_element_ref.current)
if (prevously_focused_element_ref.current instanceof HTMLElement) prevously_focused_element_ref.current?.focus()
let e = prevously_focused_element_ref.current
if (e instanceof HTMLElement) e.focus()
}
}, [open])

Expand Down

0 comments on commit 133b055

Please sign in to comment.