Bug #1543

Anchor Links Broken on Links Page

Added by Pavan Rikhi 10 days ago. Updated 10 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Pavan Rikhi% Done:


Category:PagesSpent time:-
Target version:v0.7.0 - Misc Pages & UI
Easy Pickings:


  1. Migrate zencart database
  2. Remove path from anchor links in "Links" StaticPage.
  3. Run dev server
  4. Navigate to https://localhost:7000/links/
  5. Try clicking one of the anchor links at top of page content

The page reloads instead of scrolling down to the given element.

Maybe we could do one of these?

  • Parse the content in the server when saving the content. Store the parse result in the DB and serve it to the client. Decode the parse tree and transform it into Elm HTML.
  • Store & serve the content as text instead of the result of parsing. Parse the HTML on the client and convert it into Elm HTML.

If that doesn't fix anchor links in SPAs, we'd probably have to do some routing changes. E.g., parse & store the hash content(in the route?), fetch the page data. When the page is loaded, fire a port to scroll to the element with the given name.

That would also fix cross-page anchor links.


#1 Updated by Pavan Rikhi 10 days ago

  • Description updated (diff)

Also available in: Atom PDF