mathlive
mathlive copied to clipboard
Matrix editing shortcuts are not working
Description
Since version 0.59.0 Matrix editing shortcuts are not working.
Steps to Reproduce
-
run
npm start -
open http://localhost:8080/examples/basic/index.esm.html page
-
Type
()and inside parentheses try to enter matrix editing shortcutsShortcut Command ctrl/cmd + Return/Enter addRowAfterctrl/cmd + shift + Return/Enter addRowBeforectrl/cmd + ; addRowAfterctrl/cmd + shift + ; addRowBeforectrl/cmd + , addColumnAfterctrl/cmd + shift + , addColumnBefore
Actual Behavior
Nothing happens, the editor doesn't react to commands.
No error in the console was thrown.
Expected Behavior
Commands were applied correctly to the matrix (e.g. adding row below on pressing ctrl/cmd + Enter etc. )
[Is this a regression: did it use to work in a previous version?] Yes, it worked correctly in version 0.58.0
Environment
Operating System [macOS, Windows, iOS. Include the version if possible] macOS, Windows 10
Browser [Safari, Chrome, IE, Firefox, etc...] Safari, Chrome, Edge
Hi!
I'd like to help you out with the fix of this issue but I don't know the starting point to investigate. If you could point at the place in the codebase where I should take a look it would be really helpful.
After some investigation I found out that commit 44f0c5d16bbc0096d48804c44b0a36291954107f has changes on array.ts file where convertParentToArray and
addCell functions' implementation are commented out.
Is there any reason to doing so or it was just forgotten to uncomment?
These functions are commented out because they need to be rewritten to work with the new selection model. Getting selection in matrix to work (again) is leftover work from the implementation of the new selection model. It's on my todo list.
Hi @arnog do you have any progress there?
not yet, still on my todo list
Hey @arnog - is this still on the to-dos?
Yes, still on the to-do list...
Testing this on the latest version of mathlive, and the only shortcuts that work are ctrl + enter, ctrl + ;, ctrl + shift + ;.
Could you be more specific and indicate which shortcuts you expected to work that didn’t?
All the shortcuts in the original issue should work, unless I am mistaken. Notably, the only shortcuts that work are for adding rows, not columns. I tried this on the example on the mathlive website, my own example, and by building from source.
:) This issue was filed three years ago. Things have changed. BTW, in general you're better off filing a new issue rather than commenting on a closed one. I happened to notice your comment, but that's by luck.
The matrix editing keyboard shortcuts are option+tab, option+return, option+shift+tab and option+shift+return. In theory they should be documented here, but I just noticed the documentation is not up to date.
Thank you! I read the documentation and it aligned with the shortcuts in this issue so I figured that's what they were.