Issue #3018✓ SolvedOpened September 11, 2020by dharmatv2 reactions

Page refresh preventing after click on import

Quick answerby dharmatv2

Thanks @artf I got solution, please check following solution if anyone need Sol:

Read full answer below ↓

Question

Version: 0.15.9 Are you able to reproduce the bug from the demo? Yes What is the expected behavior? Don't refresh the page after clicking on import buttion Describe the bug detailed I have included this component(grapesjs) in b-form. In which we have an import option right so I have clicked on that button it will refresh the entire page with adding of URL query params like following <b-form> <grapesjs></grapesjs> </b-form> URL query params: http://localhost:8080/?text-align=left&text-decoration=none&font-style=normal&border-collapse=separate#/examples/form What is the current behavior? It ref...

Answers (3)

👍 Most helpfuldharmatvNovember 9, 2020

Thanks @artf I got solution, please check following solution if anyone need Sol:

md.getModel().on("change:open", function () {
          // Your logic
      });
artfSeptember 14, 2020

Probably it submits the page because the import button doesn't have type="button" so it acts as type="submit" inside a form element

dharmatvSeptember 14, 2020

@artf I know that, but how can I add a type for the import button

note: I know how to add dynamically by using js. Without that, any other solution in grapesjs

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.