Undo (Ctrl+Z) is not cancelling browser keyboard shortcut
The issue you're experiencing with Ctrl+Z triggering both GrapesJS undo and the browser's "reopen last closed tab" shortcut is due to the keydown event for Ctrl+Z not having its default action prevented within GrapesJS. While GrapesJS handles the undo command internally, the event is allowed to bubble up to the browse...
Read full answer below βQuestion
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Vivaldi Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Press Ctrl+Z after doing an action, to undo itThe action is reversed, but my browser also reopens the last closed tab What is the expected behavior? Stopping the browser from performing the default keybinding. What is the current behavior? Ctrl+Z event propagation is not stopped in JS, so the browser still performs the assigned keyboard shortcut. Code of Conduct [X] I agree to follow this projec...
Answers (1)
The issue you're experiencing with Ctrl+Z triggering both GrapesJS undo and the browser's "reopen last closed tab" shortcut is due to the keydown event for Ctrl+Z not having its default action prevented within GrapesJS. While GrapesJS handles the undo command internally, the event is allowed to bub...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6087
Undo doesn't work after a Component's innerHTML is changed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Latest Reproducible demo link https://jsfi...
Issue #5691
Undo not working while seleting background or text color through color picker
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 122.0.1 Reproducible demo link htt...
Issue #4607
JS error when moving an element with its child
GrapesJS version[x] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v104Reproducible demo link https://gr...
Issue #4000
Pasting a component in root body layer throws TypeError
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v89 Reproducible demo link https://...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Tutorial
Big news from DevFuture β we just repriced everything
Hey GrapesJS community π we just repriced all prices on plugins.
Tutorial
Superβ―Tooltip for GrapesJS β Versionβ―0.1.5 Released π
Weβre excited to announce the vβ―0.1.5 update of Superβ―Tooltip, our floatingβmenu and tooltip plugin for GrapesJS
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.