Anchor links with hash navigation don't work in preview mode
Question
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 143.0.7499.41 Reproducible demo link https://jsfiddle.net/mghzw41k/2/ Describe the bug On preview mode, anchor links with hash navigation (e.g., href="#section") don't work. The default browser navigation behavior is prevented, even though preview mode should (I think) allow normal page interactions. How to reproduce the bug? Initialize GrapesJS editor Add content with an anchor link pointing to a section: <a href="#about">Go to About</a> Add a target section: <section id="about">About Sect...
Answers (2)
I encountered the same problem.
The issue you're experiencing with anchor links (hash navigation) not working in GrapesJS preview mode is a common behavior stemming from how GrapesJS handles interactions within its canvas. In editing mode, GrapesJS intercepts click events on elements, especially links, to prevent navigation and i...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5718
Possible upgrade path issue where 'textnode' is now called 'wrapper' from 0.18 -> latest
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 122.0.6261.95 (Official Bui...
Issue #4904
GetHtml() producing invalid structure when there is js inside it
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? chrome latestReproducible demo link https://...
Issue #5156
Cannot drag drop in mobile screen even add grapejs-touch
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome, IOSReproducible demo link https://ww...
Issue #4503
Missing inline styles used by CKEditor when adding raw html components
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chromium v96 Reproducible demo link https:...
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 āBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.