-
Notifications
You must be signed in to change notification settings - Fork 46
Fix prayer failure when selecting over an embedded mathquill #331
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
Conversation
4ec8ca0 to
697c3ae
Compare
| if (node) { | ||
| // Special case: if we found a node that belongs to a different root than ours, that means we're in a separate, | ||
| // embedded MathQuill instance. In that case, skip to that root's parent and continue. | ||
| const root = findControllerRoot(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you worried about run time complexity here? Seems like this itself will do an entire scan up the tree while we are already in a scan up the tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay because it will either break the loop or jump up to the container of the embedded MQ instance
test/unit/mouse.test.js
Outdated
| @@ -0,0 +1,77 @@ | |||
| suite.only('mouse', function () { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember what this means I think we don't want this .only() left in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh shoot, yes good catch
Specifically: fixed position for the #mock element, and use measurements to choose our target mouse positions so we know exactly what to expect
Fixes a prayer failure when selecting over a separate, embedded MathQuill instance