jQuery-EasyTabs icon indicating copy to clipboard operation
jQuery-EasyTabs copied to clipboard

Chrome 39 scrolls to tab anchor on click

Open ken487 opened this issue 10 years ago • 17 comments

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.

ken487 avatar Nov 26 '14 16:11 ken487

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

ahendri avatar Nov 26 '14 17:11 ahendri

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.

chtef avatar Dec 03 '14 22:12 chtef

Nevermind - my bad. I didn't port your code properly. It seems to work now - thanks.

chtef avatar Dec 04 '14 01:12 chtef

@JangoSteve will there be a release with this fix?

pascalBokBok avatar Dec 04 '14 14:12 pascalBokBok

@ahendri Thanks for the pushState fix. Hopefully this will be merged in the main branch :+1:

pathetix avatar Dec 09 '14 05:12 pathetix

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.

tD3rk avatar Dec 10 '14 17:12 tD3rk

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>

mvdepot avatar Dec 27 '14 19:12 mvdepot

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.

ahendri avatar Dec 29 '14 01:12 ahendri

EasyTabs doesn't work properly wtih this fix if page has <base> tag... At least on webkit.

Craigy- avatar Jan 20 '15 20:01 Craigy-

ahendri, I answered you on the commit's page

Craigy- avatar Jan 22 '15 10:01 Craigy-

ahendri, your fix has helped. I think it's necessary to commit.

Craigy- avatar Jan 26 '15 08:01 Craigy-

So, would you make a new commit?

Craigy- avatar Feb 04 '15 10:02 Craigy-

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

ahendri avatar Feb 09 '15 14:02 ahendri

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?

SimonVerboven avatar Oct 21 '15 09:10 SimonVerboven

+1

melcak avatar Nov 18 '15 07:11 melcak

+1

Aleserche avatar Dec 03 '15 11:12 Aleserche

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.

jmp909 avatar Feb 09 '16 14:02 jmp909