Prevent default not working for edge
The issue you're experiencing with preventDefault() not working for Ctrl+S and Ctrl+Shift+S in Microsoft Edge when the GrapesJS canvas is focused is a common challenge related to how browsers handle keyboard events within iframes and system-level shortcuts. While GrapesJS's Keymaps module is designed to prevent defaul...
Read full answer below โQuestion
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Edge 144.0.3719.92 Reproducible demo link https://jsfiddle.net/L61f0qtz/ Describe the bug How to reproduce the bug? Open GrapesJS editor in Microsoft Edge. Add a keymap for saving using either Ctrl+S or Ctrl+Shift+S with { prevent: true }. Focus on the editor canvas (or anywhere in the editor). Press the shortcut (Ctrl+S or Ctrl+Shift+S). What is the expected behavior? The GrapesJS command console.log("save") should execute. The browser should not open the โSaveโ or โSave Asโฆโ dialog What is the c...
Answers (1)
The issue you're experiencing with preventDefault() not working for Ctrl+S and Ctrl+Shift+S in Microsoft Edge when the GrapesJS canvas is focused is a common challenge related to how browsers handle keyboard events within iframes and system-level shortcuts. While GrapesJS's Keymaps module is design...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4192
Drag boundary issue with dragMode: absolute/translate
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome, firefox Reproducible demo link htt...
Issue #3873
Duplicated video block when re-attaching GrapesJs editor to document
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v94 Reproducible demo link https://...
Issue #6409
Cannot drag to move components on mobile
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v133 Reproducible demo link https:/...
Issue #6705
TypeError: Cannot read properties of undefined (reading 'toLowerCase') in keyboard handler
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? All browsers (Chrome, Safari, Firefox, Edg...
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
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins โ TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.