cferdinandi/tabby

Browser Back doesn't active start tab

Closed this issue · 2 comments

Steps for reproduces:

  1. Open Demo http://cferdinandi.github.io/tabby/ (Tab "Super Heros" is active)
  2. Change to Tab "Ice Cream"
  3. Change to Tab "Seasons"
  4. Browser Back (Tab "Ice Cream" gets active)
  5. Browser Back (Tab "Super Heros" doesn't get active - Tab "Ice Cream" stays active)

Tried to fix this the following - tabby.js Line 408:

if( !hash ) {
var toggle = document.querySelector( settings.selectorToggle );
hash = toggle.href;
} else {
var toggle = document.querySelector( settings.selectorToggle + '[href*="' + hash + '"]' );	
}

But through that i lost the possibility to set an other Tab active than the first one.

Any ideas?

This is expected behavior, as no hash change is triggered.

I do see what you're saying though. I'll have to give this one some more thought. Full disclosure, this is lower priority for me given a few other things on my plate right now.

Browser button navigation breaks accessibility expectations and is being removed in a complete rewrite that's coming tomorrow. As such, I'm closing this ticket.