Issue #2765Opened May 12, 2020by svalenciano812 reactions

[Bug] backspace key trigger navigating back

Question

Hi,

in grapesjs in Firefox 75.0 when "backspace key" (event.which === 8) is pressed the navigator is going back and grapesjs is lost.

To reproduce it: Open Firefox browser

Code SnippetTEXT
Open URL: https://grapesjs.com/
Click on: "Newsletter Demo" buttom
Delete a element from editor usign "backspace key"          (NOT using supr key)

The behavior is:  the navagator is going back and the editor is lost.

I am trying this but it doesn't work:

      **$document.on('keydown', function(e){
          if(e.which === 8){ // you can add others here inside brackets.
            e.preventDefault();
            e.stopPropagation();
          }
      });**

i can do something over/inside editor instance  to disable "firefox behavior" and prevent go back in history in browser?


thanks.

Answers (3)

artfJune 19, 20201 reactions

Should be fixed in the next release

tiptronic85May 13, 20200 reactions

Yes this is very annoying

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.