framesurge / perseus

A state-driven web development framework for Rust with full support for server-side rendering and static generation.
https://framesurge.sh/perseus/en-US
MIT License
2.15k stars 89 forks source link

Bootstrap scrollspy support #312

Closed gladion136 closed 9 months ago

gladion136 commented 10 months ago

This issue is reporting a bug in the code of Perseus. Details of the scope will be available in issue labels. The author described their issue as follows:

Bootstrap Scrollspy don't works with perseus. The links and design works but on scrolling the current section will not be selected. Inside a raw index.html it works with the same steps.

The steps to reproduce this issue are as follows:

  1. Import Bootstrap css inside header
  2. Create Template with Scrollspy from the examples: https://getbootstrap.com/docs/5.2/components/scrollspy/
  3. Import jquery and bootstrap js at the bottom of the body.

A minimum reproducible example is available at https://github.com/gladion136/perseus-bootstrap-template/tree/feature/first-draft.

Tribble internal data dHJpYmJsZS1yZXBvcnRlZCxDLWJ1ZyxBLWRlcGxveW1lbnQ=
arctic-hen7 commented 10 months ago

Hmm, this looks like it might be a hydration issue, and as such probably a Sycamore bug. Have you tried without hydration (just remove the hydrate flag in your Cargo.toml) or with vanilla Sycamore?

gladion136 commented 10 months ago

The error also occurs without the hydrate feature. I have uploaded my source code here Github-src

arctic-hen7 commented 10 months ago

Okay, interesting. Could you try the same markup through Sycamore? I'm not seeing how this could be a Perseus bug, I reckon its probably something with Sycamore (unless Perseus' page loading is disrupting something...).

gladion136 commented 10 months ago

You're right. The bug also occurs with a sycamore project Example Project. I created an Issue there: https://github.com/sycamore-rs/sycamore/issues/646