jQuery-EasyTabs
jQuery-EasyTabs copied to clipboard
Chrome 39 scrolls to tab anchor on click
In chrome 39 on Xubuntu the browser scrolls the page to the tab anchor (eg, #tab-1) when you click it. It did't do that in chrome 32 or any other browser I tested it in.
This hash jump problem does also occur in other browsers. There are solutions to fix it, but most are complicated, blow up the code and might cause side-effects. Instead I proposed a patch to use the modern history API for browsers that support it and to only fallback to manipulation the location directly. See: https://github.com/JangoSteve/jQuery-EasyTabs/pull/203
Hello ahendri, just want to mention that the fix doesn't seem to work with the latest Chrome version (39). It actually makes the browser jump around even more when I click on tabs. Any suggestion? Thanks.
Nevermind - my bad. I didn't port your code properly. It seems to work now - thanks.
@JangoSteve will there be a release with this fix?
@ahendri Thanks for the pushState fix. Hopefully this will be merged in the main branch :+1:
This fix works well for when a tab is clicked, however it does not apply to page load of a link. So if you were to click a link to http://website.com/page#tab2 the previous undesirable behavior would still be in effect.
The fix did not change the jump issue in chrome 39 when using ajax.
<li class="tab"><a href="ajax1.txt" data-target="#tabs-ajax-html">tab1</A></LI>
Agreed that this does not fix all issues, but at least for me it would still be an improvement.
I like the simplicity of the project and would like to continue using it, but not being sure if it is still under active leadership I am a little reluctant to spend too much time on proposing more fixes.
EasyTabs doesn't work properly wtih this fix if page has <base>
tag... At least on webkit.
ahendri, I answered you on the commit's page
ahendri, your fix has helped. I think it's necessary to commit.
So, would you make a new commit?
I am actually not really feeling comfortable pushing this as I wasn't able to test give it a try at least in all the common browsers. Still I will make a change request now and hope for comments if something does not work out allright
We are actually using easytabs on a project and are experiencing the same issue on Chrome 46.x .. just before I updated, I was on Chrome 45.x and there weren't any issues on that version. Seems pretty odd as I wouldn't expect any major code changes to have happened to cause this.
Is there a fix for this or not really?
+1
+1
I think it might be related to this. https://github.com/JangoSteve/jQuery-EasyTabs/pull/203#issuecomment-181872410
My browser was jumping to somewhere it shouldn't be, because it's trying to be helpful and show you the content , which of course is not what we need it to do and actually was doing it incorrectly.
Could be a separate issue though, but it's definitely a recent browser change as I wasn't having issues with easytabs on my site until recently
The shim fix works for me, but again my problem is slightly different.