Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes two changes that will be helpful for static maths in the calculator:
(1) adds a "select" method to StaticMath, so that we don't need to rely on initial focus as the only way to select content
(2) fixes a bug where mousedown on a static math would -- just the first time -- fire off a focus event, before anything was selected.
Repro for this (very subtle):
(1) open https://www.desmos.com/scientific
(2) type sqrt(2)
(3) click on the evaluation on the right (note that the expression would deselect)
(4) click back into the left side to re-focus the expression
(5) click on the evaluation on the right again (note the expression doesn't deselect the second time)