Closed TristanCacqueray closed 8 months ago
This is pulling #503 to make the group visibility on hover works (that seems broken with v2 ...). I did my best to make it look pretty, but that could use some polish, for example to move the anchor to the side... Well I think this is now ready for review.
Actually there is an issue with the <base href=...>
head element which makes <a href=#id>
points at /#id
instead of /page#id
. It seems like this was introduced in 936b62d , and I guess it would be better to make relative links use the siteUrl instead of forcing / on every page. Otherwise we can make the anchor link absolute, but that seems wrong.
@TristanCacqueray Great, this looks good to me. I'll do some final tweaks before merging. In particular I want to see if I can factor out the duplication.
Actually there is an issue with the
<base href=...>
head element which makes<a href=#id>
points at/#id
instead of/page#id
. It seems like this was introduced in 936b62d , and I guess it would be better to make relative links use the siteUrl instead of forcing / on every page. Otherwise we can make the anchor link absolute, but that seems wrong.
Though the stackoverflow answer gives rise to glitchy scrolling.
Actually there is an issue with the
<base href=...>
head element which makes<a href=#id>
points at/#id
instead of/page#id
. It seems like this was introduced in 936b62d , and I guess it would be better to make relative links use the siteUrl instead of forcing / on every page. Otherwise we can make the anchor link absolute, but that seems wrong.
FWIW, absolute links were used in #361 to replace JavaScript for footnotes and I also planned to use them for headings, but never got to it. @TristanCacqueray Thanks for taking this up!
@kukimik you are welcome, thank you folks for following up on that :)
It seems a bit janky with the live server, clicking on an anchor sometime scrolls at the bottom. I suspect the ema-shim.js is somehow selecting an outdated element and I wonder if waiting for a morphdom event before scrolling into view would help.
Also this still needs:
I suspect the ema-shim.js is somehow selecting an outdated element and I wonder if waiting for a morphdom event before scrolling into view would help.
Probably this. It would be great to fix this in Ema. Happy to accept a PR.
Thank you @srid for the fixing the code and merging it quickly, that's great!
Fixes #480
Uses https://github.com/srid/heist-extra/pull/6