mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-09 21:51:42 +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) {
|
function handleDocumentMouseDown(hook, event) {
|
||||||
// If the click is outside the notebook element, keep the focus as is
|
// If the click is outside the notebook element, keep the focus as is
|
||||||
if (!event.target.closest(`[data-element="notebook"]`)) {
|
if (!event.target.closest(`[data-element="notebook"]`)) {
|
||||||
|
if (hook.state.insertMode) {
|
||||||
|
setInsertMode(hook, false);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ defmodule LivebookWeb.SessionLive.CellUploadComponent do
|
||||||
<div>
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<%= live_file_input @uploads.cell_image, class: "hidden" %>
|
<%= 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") %>
|
<%= remix_icon("folder-upload-line") %>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue