[Feature Request] Add option to revert to command mode
See original GitHub issueEdit
I have since learned (https://github.com/arnog/mathlive/issues/915#issuecomment-826382433) that this is intended and is due to the new Latex Mode feature. However it would then be nice to have an option to revert to command mode or disable it completely. This is because in my app pressing enter is regarded as submission making leaving Latex Mode once entered difficult.
Description
When typing the latex for a latex symbol ie. \neg
, \cup
, or others tab completion of these symbols does not appear to work anymore.
Codesandbox: https://codesandbox.io/s/brave-lewin-5hvg2?file=/index.html
Steps to Reproduce
- Open the above Codesandbox
- Attempt to type a latex symbox ie.
\cap
- Attempt to complete the symbol using tab
Actual Behavior
When pressing tab nothing happens and it appears to stay in its latex symbol completion state.
Expected Behavior
The symbol is substituted in and normal typing can be proceeded.
This regression began with 0.60.0
as going to 0.59.0
produces the expected functionality.
Environment
MathLive version
0.63.0
however issue began in 0.60.0
Operating System Arch Linux
Browser Firefox
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Yes, that did work (see: https://github.com/tjquillan/discrete-calculator/blob/c2f7b912af153eff06ce534c7f82841453aed3ea/src/components/Mathfield/Mathfield.tsx#L73) alternatively I was using this (https://github.com/tjquillan/discrete-calculator/blob/223b979dce7ecb1674c59324fdf2be5ef91ed5a1/src/components/Mathfield/Mathfield.tsx#L79) as a workaround before, but that is much cleaner. Thanks for the tip!
Would it be possible for you to use the
onCommit
hook instead of listening for the enter event? (Or preventing enter events in the mathfield from bubbling up and using theonCommit
hook for mathfields. The rest of the app can still use enter)