Skip to content

Commit

Permalink
don't focus textarea on tapstart for static math
Browse files Browse the repository at this point in the history
we only need focus when something is selected, and the fact that
we were focusing prematurely resulted in some small behavior inconsistencies
between the first and second time e.g. that you'd click on a static table
cell in the calculator
  • Loading branch information
eluberoff committed Nov 25, 2024
1 parent 40f5efc commit 487e225
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/mouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ class Controller_mouse extends Controller_latex {
};

if (ctrlr.blurred) {
textarea.focus();
//for static mathquills, we focus on mousemove
if (this.editable) textarea.focus();
// focus call may bubble to clients, who may then write to
// mathquill, triggering cancelSelectionOnEdit. If that happens, we
// don't want to stop the cursor blink or bind listeners,
Expand Down

0 comments on commit 487e225

Please sign in to comment.