Skip to content

Commit

Permalink
Merge pull request #241 from desmosinc/dont-prepend-to-empty-fragment
Browse files Browse the repository at this point in the history
Don't attempt to prepend to an empty DOMFragment.
  • Loading branch information
jwmerrill authored Mar 6, 2022
2 parents 60d51cc + 0851bc2 commit aab6ed2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/mouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ class Controller_mouse extends Controller_latex {
};

if (ctrlr.blurred) {
if (!ctrlr.editable)
domFrag(rootElement || undefined).prepend(domFrag(textareaSpan));
if (rootElement && !ctrlr.editable) {
domFrag(rootElement).prepend(domFrag(textareaSpan));
}
textarea.focus();
// focus call may bubble to clients, who may then write to
// mathquill, triggering cancelSelectionOnEdit. If that happens, we
Expand Down

0 comments on commit aab6ed2

Please sign in to comment.