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
Closed

Prevent undo plugin keyboard shortcuts #6028

jacekbogdanski opened this issue May 23, 2019 · 1 comment
Assignees
Milestone

Comments

@jacekbogdanski
Copy link

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
@mrpiotr-dev mrpiotr-dev self-assigned this May 24, 2019
@mrpiotr-dev mrpiotr-dev added this to the May 2019 milestone May 24, 2019
@AMBudnik AMBudnik added the bug label May 24, 2019
mrpiotr-dev pushed a commit that referenced this issue May 29, 2019
* 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
Copy link
Contributor

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
Projects
None yet
Development

No branches or pull requests

3 participants