Page refresh preventing after click on import
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 refreshing the entire page after clicking on the import button
Describe the bug detailed
Refreshing entire page when I am clicking on the import button
Are you able to attach screenshots, screencasts, or a live demo?
Yes https://drive.google.com/file/d/1FsRxtize5UL1XLic_7F6S3CO91_ctauh/view
Could u please help anyone how to do resolve this
Thanks
Answers (3)
Thanks @artf I got solution, please check following solution if anyone need Sol:
md.getModel().on("change:open", function () {
// Your logic
});
Probably it submits the page because the import button doesn't have type="button" so it acts as type="submit" inside a form element
@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.
Issue #3731
BUG: Text element not able to be selected twice after extended with events
Version: 0.17.25 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? Update a existing component o...
Issue #3134
BUG: Canvas scroll to top of the page when I try to drag an element from the last sections
Version: 0.16.27 Are you able to reproduce the bug from the demo? [ X] Yes [ ] No What is the expected behavior? When a try to drag a compo...
Issue #3622
BUG: I18n functionality
Version: latest Are you able to reproduce the bug from the demo?[] Yes[ ] No What is the expected behavior? to editor.I18n.setLocale("es")...
Issue #3291
BUG (v0.16.41): the duplicate icon from the icon toolbar is modifying the original element too
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes What is the expected behavior? The elements duplicated not shoul...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.