mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-01 03:38:53 +08:00
Fix persistent insert mode in modals
This commit is contained in:
parent
9b2f039e29
commit
d0ec965fad
2 changed files with 4 additions and 1 deletions
|
@ -343,6 +343,9 @@ function handleDocumentKeyDown(hook, event) {
|
|||
function handleDocumentMouseDown(hook, event) {
|
||||
// If the click is outside the notebook element, keep the focus as is
|
||||
if (!event.target.closest(`[data-element="notebook"]`)) {
|
||||
if (hook.state.insertMode) {
|
||||
setInsertMode(hook, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ defmodule LivebookWeb.SessionLive.CellUploadComponent do
|
|||
<div>
|
||||
<label>
|
||||
<%= live_file_input @uploads.cell_image, class: "hidden" %>
|
||||
<div class="inline-block cursor-pointer button button-gray button-square-icon">
|
||||
<div class="cursor-pointer button button-gray button-square-icon">
|
||||
<%= remix_icon("folder-upload-line") %>
|
||||
</div>
|
||||
</label>
|
||||
|
|
Loading…
Reference in a new issue