Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome 39 scrolls to tab anchor on click #205

Open
ken487 opened this issue Nov 26, 2014 · 17 comments
Open

Chrome 39 scrolls to tab anchor on click #205

ken487 opened this issue Nov 26, 2014 · 17 comments

Comments

@ken487
Copy link

ken487 commented Nov 26, 2014

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.

@ahendri
Copy link
Contributor

ahendri commented Nov 26, 2014

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: #203

@chtef
Copy link

chtef commented Dec 3, 2014

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
Copy link

chtef commented Dec 4, 2014

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

@pascalBokBok
Copy link
Contributor

@JangoSteve will there be a release with this fix?

@pathetix
Copy link

pathetix commented Dec 9, 2014

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

@tD3rk
Copy link

tD3rk commented Dec 10, 2014

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.

@mvdepot
Copy link

mvdepot commented Dec 27, 2014

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>

@ahendri
Copy link
Contributor

ahendri commented Dec 29, 2014

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.

@Craigy-
Copy link
Contributor

Craigy- commented Jan 20, 2015

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

@Craigy-
Copy link
Contributor

Craigy- commented Jan 22, 2015

ahendri, I answered you on the commit's page

@Craigy-
Copy link
Contributor

Craigy- commented Jan 26, 2015

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

@Craigy-
Copy link
Contributor

Craigy- commented Feb 4, 2015

So, would you make a new commit?

@ahendri
Copy link
Contributor

ahendri commented Feb 9, 2015

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

@SimonVerboven
Copy link

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?

@melcak
Copy link

melcak commented Nov 18, 2015

+1

1 similar comment
@Aleserche
Copy link

+1

@jmp909
Copy link

jmp909 commented Feb 9, 2016

I think it might be related to this. #203 (comment)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests