If the id of a `.formulaequationinput input` element contains a special
character, then the selector for $preview was silently failing to match
the element, because no escaping was happening.
This fixes the issue by escaping the id before passing to the jQuery
selector function. CSS.escape is the ideal method, but this isn't
present in IE or Edge, so we use a fallback borrowed from the new
jQuery.escapeSelector method.
Student couldn't able to submit his answer in ie9
becuase mathjax was used before its complete loading
thats cuase the problem. Mathjax operations should be
handled synchronously inorder to avoid error.
BLD-1199
Declare variables locally
- The `allSections` variable was leaking into the global scope, due to a
typo in the declaration.
- `dataProcessed` can be declared more narrowly within the callback.
to successfully call a function with parameters by setTimeout,
it needs to be a function that will be called by setTimeout internally.
this patch actually enables multiple tries for calling the setState function.
Change the `MathJax.Hub.Queue(initializeRequest)` to a simpler function call
(`initializeRequest.call(this)`). This was failing to give a proper context
to initializeRequest, and `this.value` was turning up as `undefined`.
Also add a fallback if we need to display some code before MathJax finishes
its original typesetting.
I was stubbing out `Queue` in my specs, so the tests had to be changed around
a little.
Named `FormulaEquationInput` (name up for debate)
- Based off ChemEqnIn
- Add FormulaEquationInput in inputtypes.py
- Add a call to a skeleton method for a preview
javascript:
- Queue up some MathJax
- Put some ordering on the AJAX requests: add a parameter when the request was started, when it returns check that it isn't outdated before displaying the preview
- Tests
Note: we moved the `jsinput` tests and DISABLED them, because they were causing the tests to fail.