mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-02 12:18:20 +08:00
Allow selecting text within editor tooltips
This commit is contained in:
parent
1785a593f5
commit
df8c074714
1 changed files with 9 additions and 0 deletions
|
@ -461,6 +461,15 @@ const Session = {
|
|||
return;
|
||||
}
|
||||
|
||||
// If the click is inside an editor tooltip, exit insert mode to
|
||||
// allow for text selection within the tooltip
|
||||
if (event.target.closest(`.cm-tooltip`)) {
|
||||
if (this.insertMode) {
|
||||
this.setInsertMode(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue