Issue #6695๐Ÿ’ฌ AnsweredOpened Feb 2, 2026by Axel3030 reactions

Prevent default not working for edge

Quick answerby GJS Helper

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)

GJS Helperโ€ข May 17, 2026

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins โ†’
Premium option

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.

All tutorials โ†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.