Skip to main content

vbourdeix

Member since Jul 12, 2018

Recent Blog Comments By vbourdeix

  • Creating A Jump-To-Anchor Fragment Polyfill In Angular 5.2.0

    Posted on Jul 13, 2018 at 3:42 AM

    Hey, I just overcame the issue with Chrome, it was quite simple in the end. Just add this code at the beginning of the ngOnInit in the FragmentTargetDirective : if ('scrollRestoration' in history) { history.scrollRestoration = 'manual'; } It disables the Chrome automatic scroll posi... read more »

  • Creating A Jump-To-Anchor Fragment Polyfill In Angular 5.2.0

    Posted on Jul 12, 2018 at 10:48 AM

    To be precise, I've got an issue only in Chrome. This works on first load with firefox and edge. I've noticed that the scroll happens during a microsecond before getting sent to the top for some reason. Probably linked to Chrome.... read more »

  • Creating A Jump-To-Anchor Fragment Polyfill In Angular 5.2.0

    Posted on Jul 12, 2018 at 10:36 AM

    It's quite similar to the solution I tried (without the polyfill approach) and it has the same issue for me : When I load the page, it doesn't work because, from what I suspect, the DOM element exists, so the scrollIntoView does not fail, but the contents are not loaded yet so it scrolls at ... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel