amp html - Prevent <amp-sidebar> from going back to the top of the page -
i'm trying create simple replacement previous hamburger menu, had navigation links scroll pageview specified section using href="#section"
.
since cannot use checkbox trick anymore, had use <amp-sidebar>
it:
<amp-sidebar id="sidebar" layout="nodisplay" side="right"> <ul> <li> <a href="#secion1">section 1</a> </li> <li> <a href="#secion2">section 2</a> </li> <li> <a href="#secion3">section 3</a> </li> </ul> </amp-sidebar>
the problem is, every time sidebar closed, page gets scrolled it's top position (even url reverted original state, #section
removed).
is there way prevent behavior?
that behaviour seems bug. please file issue on github project: https://github.com/ampproject/amphtml/issues/new
Comments
Post a Comment