jquery-stickytabs icon indicating copy to clipboard operation
jquery-stickytabs copied to clipboard

scroll to top is confusing on long pages

Open timabell opened this issue 9 years ago • 2 comments

Hiya,

We now have the workaround for the unwanted scrolling down to the tab (pr #11), however I think we've created a different problem as a result.

The scroll to top is happening even when you already are on the page and just switching tabs. I don't think it should scroll at all when you already have the page open (easier said than done I know).

To see what I mean:

  • up the back-to-top test page
  • make your browser small enough that the filler text at the top pushes the tabs off the bottom of the window
  • scroll down to the tabs
  • click another tab
  • notice that the page is scrolled to the top and you can no longer see what you clicked on

this is in firefox.

timabell avatar Jul 30 '15 11:07 timabell

perhaps @jabbtech could pile in on this one?

timabell avatar Jul 30 '15 14:07 timabell

Hey @timabell!

Having the scroll to top always happen can be useful in instances where there is a desire to switch tabs while at the same time keeping a sites primary navigation at the top of a page in view. It wouldn't be too difficult to expand the backToTop option though, we could address the issue you described by passing the desired behavior like:

backToTop: always | onload | none

curtisweeks avatar Jul 30 '15 21:07 curtisweeks