mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-10 15:04:25 +08:00
Clarify why we keep insert mode on insert button click
This commit is contained in:
parent
0fcb99db64
commit
a73cea19cc
1 changed files with 5 additions and 1 deletions
|
@ -471,7 +471,11 @@ const Session = {
|
|||
return;
|
||||
}
|
||||
|
||||
// When clicking an insert button, keep focus and insert mode as is
|
||||
// When clicking an insert button, keep focus and insert mode as is.
|
||||
// This is relevant for markdown cells, since we show the markdown
|
||||
// preview in insert mode and exiting insert mode on mousedown would
|
||||
// result in layout shift, so mouseup would happen outside the target
|
||||
// button and the click would be ignored
|
||||
if (event.target.closest(`[data-el-insert-buttons] button`)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue