Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-12 Thread Ed Bras
​@Jens: thanks, i hoped I missed something simple. I think I just leave it for now. It's more a "nice-2-have" and there are more important thinks now,a and I remember messing with the browser history can become a bit hairy.. -- You received this message because you are subscribed to the Google Gr

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-12 Thread Jens
Well then your only option is probably pushState. If the browser does not support pushState then you are out of luck. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it,

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-12 Thread Ed Bras
@Jens: I don't think your solution isn't working. You mentioned I should not use id attribute, and instead use something like data-scroll-id. I change it now to for example: ..., but still the browser jumps on pressing the history back button before I can process my history marker. Details: As so

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-11 Thread Ed Bras
@Jaga: I already have the smooth scrolling for free through the components I use. The problem is probably that I use the "id" attribute like @Jens mention, which I will also do in LayoutPanel ;).. I am about to test it, I will come back on it. ​ -- You received this message because you are subscr

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-11 Thread jaga
Is it possible for you to use LayoutPanels? If you can then you get animation for free. You can easily do smooth scrolling using this. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving email

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-11 Thread jaga
Is it possible for you to use LayoutPanels? If you can the. You get animation for free. You can easily do smooth scrolling using this. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving email

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-10 Thread Ed Bras
@Jens, thanks I think this is the problem: > Since your site should not have an element with id=section-1 Interesting... wasn't aware of that, that is what I do and will probably be the problem . I will change it, using the data- attribute as you suggest and let you know how it works. I tried to

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-10 Thread Jens
So if its so important to you to smooth scroll then you have to implement it yourself without using the native browser behavior. E.g. use any tag with data-scroll-id=section-1 attribute and search that element whenever you get a history change event for #section-1. Since your site should not h

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-10 Thread Ed Bras
@Gilbert, thanks, but don't think I made myself clear, sorry for that. What you are writing is exactly what I do, the problem is that before I can perform the scrolling myself because I capture a History event the browser did already the scrolling for me like explained in my original post. btw: I

Re: How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-09 Thread Gilberto
I wouldn't recommend disabling the back/next behavior. For your case, you could save the scroll position of each View (using a ScrollHandler to catch the events), and when the History is changed, scrol

How to do smooth scrolling on browser back/next button on same-page navigation?

2015-05-05 Thread Ed
I have a sticky top menu with menu items that perform smooth scrolling (through GreenSock) to a certain page location (I stay on the same page all the time). It will also add a History token for every unique page location. That works fine, it scrolls smooth and the back/next browser buttons work