Skip to content
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

Prevent undo plugin keyboard shortcuts #6028

Closed
jacekbogdanski opened this issue May 23, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@jacekbogdanski
Copy link

commented May 23, 2019

Description

I couldn't find an easy way to prevent undo plugin keyboard shortcuts. As far as I know, there is no such option for this plugin.

I found that you can overwrite some hooks using updateSettings, however, undo plugin hooks are reattached every time when using hot.updateSettings function, so this method doesn't work for this special case.

I also tried to use afterDocumentKeyDown to customize beforeKeyDown hook as a workaround but seems that despite event.stopImmediatePropagation method, beforeKeyDown is still invoked by afterDocumentKeyDown. Stopped propagation is also not respected by undoRedo plugin.

Could you provide some API option to disable undo plugin keyboard shortcuts?

Your environment

  • Handsontable version: 7.0.0
  • Browser Name and version: Any
  • Operating System: Any

swistach added a commit that referenced this issue May 23, 2019

swistach added a commit that referenced this issue May 24, 2019

@swistach swistach self-assigned this May 24, 2019

@swistach swistach added this to the May 2019 milestone May 24, 2019

swistach added a commit that referenced this issue May 24, 2019

swistach added a commit that referenced this issue May 24, 2019

@AMBudnik AMBudnik added the Type: Bug label May 24, 2019

swistach added a commit that referenced this issue May 29, 2019

Should be possible to block UndoRedo's keyboard shortcuts (#6029)
* Changed: UndoRedo hotkeys could be blocked by stopImmidiatePropagation on beforeKeyDown. #6028

* Adjusted keydown helper for tests. #6028

* Revert checking if ctrl+y was used in chrome. This is a problem only in Chrome for MacOS. #6028

* Removed unnecessary helper from undoRedo plugin. #6028
@AMBudnik

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

Glad to see this issue fixed. The fixed version is available from 7.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.