You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary:
We noticed that for MathJax only interaction it could cause issue
as the `trimLeft/Right` function gets into infinite loop (wow!).
This might be the contribution of some of the slowness issue we see.
This is a fix for that. We also ensure that the space around the
text is displayed properly, that give some indication of selection.
I also took a look at the upstream, but did not notice any relevant fixes
that is related.
Issue: https://khanacademy.atlassian.net/browse/DI-1513
## Test plan:
Run `yarn start`
Selecting on the "Pure mathjax" interaction will show this issue without the fix.
Tested on:
- [x] Chrome
- [x] Safari
- [x] Firefox
Author: dat-boris
Reviewers: lizfaubell
Required Reviewers:
Approved By: lizfaubell
Checks: ⌛ Tests / E2E Tests, ✅ Build JS Bundle / Build, ✅ Lint / Run ESLint, ✅ Tests / Unit Tests, ✅ Build JS Bundle / Build Coverage
Pull Request URL: #15
Copy file name to clipboardExpand all lines: src/examples/rich_text_table/tasks.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[
2
2
{
3
3
"data": {
4
-
"text": "[[\"Asking question?<a href=\\\"javascript:alert('pwned')\\\">click</a>\", \"Answer! Look at some LaTex\\n\\n\\\\(\\\\dfrac{1}{2k - 6} = \\\\dfrac{1}{3}\\\\) and \\\\(\\\\dfrac{1.5}{2k - 6} = \\\\dfrac{1}{3}\\\\)\\n\\n\"], [\"Asking more question in LaTex?\\n\\n\\\\[\\n\\\\begin{array}{r}\\n 3.050 \\\\\\\\\\n- 0.338 \\\\\\\\\\n\\\\hline\\n\\\\end{array}\\n\\\\]\\n\\n\", \"More LaTex! $4 to $5. \\n\\n\\\\(\\\\dfrac{3}{2k - 6} = \\\\dfrac{1}{3}\\\\)\\n\\n\"], [\"Following is not Math\", \"$4 to $5\"]]"
4
+
"text": "[[\"Asking question?<a href=\\\"javascript:alert('pwned')\\\">click</a>\", \"Answer! Look at some LaTex\\n\\n\\\\(\\\\dfrac{1}{2k - 6} = \\\\dfrac{1}{3}\\\\) and \\\\(\\\\dfrac{1.5}{2k - 6} = \\\\dfrac{1}{3}\\\\)\\n\\n\"], [\"Asking more question in LaTex?\\n\\n\\\\[\\n\\\\begin{array}{r}\\n 3.050 \\\\\\\\\\n- 0.338 \\\\\\\\\\n\\\\hline\\n\\\\end{array}\\n\\\\]\\n\\n\", \"More LaTex! $4 to $5. \\n\\n\\\\(\\\\dfrac{3}{2k - 6} = \\\\dfrac{1}{3}\\\\)\\n\\n\"], [\"Following is not Math\", \"$4 to $5\"], [\"\\\\(\\\\dfrac{3}{2k - 6} = \\\\dfrac{1}{3}\\\\)\", \"\\\\(\\\\dfrac{3}{2k - 6} = \\\\dfrac{1}{3}\\\\)\"]]"
0 commit comments