diff --git a/assets/css/js_interop.css b/assets/css/js_interop.css index d9372f9b8..faed34369 100644 --- a/assets/css/js_interop.css +++ b/assets/css/js_interop.css @@ -128,28 +128,13 @@ solely client-side operations. @apply hidden; } -[data-el-session]:not([data-js-insert-mode]) - [data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed]) - [data-el-editor-box], [data-el-session] [data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed]):not([data-js-focused]) [data-el-editor-box] { @apply h-0 overflow-hidden; } -[data-el-session][data-js-insert-mode] - [data-el-cell][data-type="setup"][data-js-focused] - [data-el-enable-insert-mode-button], [data-el-session] - [data-el-cell][data-type="setup"][data-eval-validity="fresh"]:not([data-js-empty]) - [data-el-enable-insert-mode-button], -[data-el-session] - [data-el-cell][data-type="setup"][data-js-changed] - [data-el-enable-insert-mode-button] { - @apply hidden; -} - -[data-el-session][data-js-insert-mode] [data-el-cell][data-type="setup"][data-js-focused] [data-el-info-box], [data-el-session] diff --git a/assets/js/hooks/session.js b/assets/js/hooks/session.js index c0d896fbe..b6a16d9be 100644 --- a/assets/js/hooks/session.js +++ b/assets/js/hooks/session.js @@ -520,12 +520,7 @@ const Session = { const cell = event.target.closest(`[data-el-cell]`); const type = cell && cell.getAttribute("data-type"); - if ( - type && - ["markdown", "setup"].includes(type) && - this.focusedId && - !this.insertMode - ) { + if (type && type === "markdown" && this.focusedId && !this.insertMode) { this.setInsertMode(true); } }, diff --git a/lib/livebook_web/live/session_live/cell_component.ex b/lib/livebook_web/live/session_live/cell_component.ex index 8c0046483..88aae4c67 100644 --- a/lib/livebook_web/live/session_live/cell_component.ex +++ b/lib/livebook_web/live/session_live/cell_component.ex @@ -104,7 +104,6 @@ defmodule LivebookWeb.SessionLive.CellComponent do status={@cell_view.eval.status} /> <:secondary> - <.enable_insert_mode_button /> <.package_search_button session_id={@session_id} runtime={@runtime} socket={@socket} /> <.cell_link_button cell_id={@cell_view.id} /> <.setup_cell_info />