ng2-ui / scrollable

Angular2 Automatic Scroll Detection With Animation
17 stars 10 forks source link

Doesn't Working in Mozila Firefox #12

Closed ahirhasmukh closed 7 years ago

ahirhasmukh commented 7 years ago

I have used Angular4 Angular-cli 1.2.1. I have made one page website but 3 pages are single so I have added 3 pages.

One page tab like Home About us Product Gallery Another page is FAQ's and Contact us In Footer link of Terms of use

When I at home page then I show Home About us Product Gallery FAQ's and Contact us When I at FAQ's or Contact us page then I show Home FAQ's and Contact us

But I want to show all page in header when I at FAQ's or Contact us. I have set and get item using session.

One page header is difference and FAQ's or Contact us header is difference.

HTML & Typescript Code

=================== Set Item in Session ============

<a (click)="onTab('Faqs')" scrollTo>FAQ's</a>

onTab(tabName){
    sessionStorage.setItem(tabName, "true");
    this.router.navigate(['/']);
  }

=================== Get and Set Item in Session ============

import {scrollTo} from 'ng2-utils';

 ngAfterViewInit(){
    if (sessionStorage.getItem('Faqs') == 'true') {
      sessionStorage.setItem('Faqs', 'false');
      setTimeout(function () {
        scrollTo('#Faqs');
      }, 70);
    }
}

Working in Google Chrome,Edge browsers but still not working on Mozilla Firefox. So please assistance me.

aminsmartsense commented 7 years ago

Same issue coming in my live project. Please give me some batter solution for this ASAP.

Thank you.

allenhwkim commented 7 years ago

@https://github.com/ng2-ui/scrollable/pull/13

Fixed and released