mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

Matrix editing shortcuts are not working

Open Kydyralin opened this issue 4 years ago • 7 comments

Description

Since version 0.59.0 Matrix editing shortcuts are not working.

Steps to Reproduce

  1. run npm start

  2. open http://localhost:8080/examples/basic/index.esm.html page

  3. Type () and inside parentheses try to enter matrix editing shortcuts

    Shortcut Command
    ctrl/cmd + Return/Enter addRowAfter
    ctrl/cmd + shift + Return/Enter addRowBefore
    ctrl/cmd + ; addRowAfter
    ctrl/cmd + shift + ; addRowBefore
    ctrl/cmd + , addColumnAfter
    ctrl/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

Kydyralin avatar Dec 01 '20 11:12 Kydyralin

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.

Kydyralin avatar Dec 02 '20 15:12 Kydyralin

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?

Kydyralin avatar Dec 03 '20 10:12 Kydyralin

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.

arnog avatar Dec 03 '20 11:12 arnog

Hi @arnog do you have any progress there?

alexprey avatar Dec 10 '20 10:12 alexprey

not yet, still on my todo list

arnog avatar Dec 11 '20 13:12 arnog

Hey @arnog - is this still on the to-dos?

96imranahmed avatar Nov 29 '21 22:11 96imranahmed

Yes, still on the to-do list...

arnog avatar Nov 30 '21 10:11 arnog

Testing this on the latest version of mathlive, and the only shortcuts that work are ctrl + enter, ctrl + ;, ctrl + shift + ;.

amarcolini avatar May 24 '23 02:05 amarcolini

Could you be more specific and indicate which shortcuts you expected to work that didn’t?

arnog avatar May 24 '23 03:05 arnog

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.

amarcolini avatar May 24 '23 05:05 amarcolini

:) 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.

arnog avatar May 24 '23 05:05 arnog

Thank you! I read the documentation and it aligned with the shortcuts in this issue so I figured that's what they were.

amarcolini avatar May 24 '23 20:05 amarcolini