Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Khan #6

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Khan #6

wants to merge 11 commits into from

Conversation

Agapanthus
Copy link
Owner

No description provided.

desa and others added 11 commits June 2, 2014 15:16
…≥] pairs

Test Plan:
Confirmed that the `edited` handler is now called on swap (pressing "=" when
< or > is left of cursor, or deleting when ≤ or ≥ is left of cursor).
Test Plan:
Created a fraction without getting a JS error.
Test Plan:
Successfully insert ≠ by pasting \ne.
Not sure if this is the best way to do this - KaTeX seems to somehow use
just the file name and has it resolve correctly. Suggestions appreciated!

Test Plan:
See fonts render correctly in webapp

Auditors: jack
Test Plan:
Make subrepo, see built files present without having to build.
… behavior.

Summary:
Previously, if you included '-' in `MathQuill.addCharsThatBreakOutOfSupSub()`
it would prevent you from being able to enter negative exponents. This is a
shame because the behavior is otherwise desirable - at all other times, you
want to break out of a super/subscript by default when encountering subtraction
that isn't wrapped in parentheses.

This fixes the behavior by always allowing a (single) negative sign to be
inserted as the first character inside a super/subscript.

Addresses some of T2730

Test Plan:
In Perseus' MathInput, verified the following:
1) Typing 'x^a-b' results in (x^a) - b
2) Typing 'x^-a-b' results in (x^-a) - b
3) Typing 'x^a', moving left once, then typing '-' results in (x^-a)

Reviewers: alpert

Reviewed By: alpert

Subscribers: michelle, jack

Differential Revision: http://phabricator.khanacademy.org/D11366
Summary: Fixes the second blinking cursor seen on iOS (mathquill#310).

Test Plan: - Test mathquill editor on iOS and observe that there is only one cursor

Reviewers: aria, alex

Reviewed By: alex

Differential Revision: http://phabricator.khanacademy.org/D12105
rendering in Chrome v40.xxxxxx

Conflicts:
	src/cursor.js
Test Plan:
Made the change locally in webapp, observed that the box goes away here:
/math/cc-sixth-grade-math/cc-6th-expressions-and-variables/cc-6th-writing-expressions/e/writing-expressions-with-variables-word-problems

Auditors: @aria
Summary:
Mathquill keeps track of a boolean `shouldBeSelected` based on the
input to a `select` method, which determines if the textarea _should_
be selected and, if it isn't, reselects it.

There is a bug where one can select the text in the box, continue
typing, and not be able to escape with the tab key. This is because
the combination of selecting all text and immediately typing does not
reset the `shouldBeSelected` variable as it should. Instead, this
variable only updates if the user selects the contents and hits
"backspace."

The fix for this was simple, we need to invoke `selectionChanged()`
not only when the selection is deleted, but when it is replaced.

Test Plan:
I did the following in Perseus (thanks @aria for providing the repro
steps)

. Create two expression inputs
. In the first, type something
. Select all (Ctrl/Cmd-A)
. Type again
. Hit the tab key
. See you are directed to the next expression input as expected

Reviewers: emily, aria, john

Reviewed By: john

Subscribers: john, alex, aria, #a11y

Maniphest Tasks: T3686

Differential Revision: https://phabricator.khanacademy.org/D16962
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants