twitter-bootstrap-wizard icon indicating copy to clipboard operation
twitter-bootstrap-wizard copied to clipboard

Previous/next ignores hidden tabs

Open kennethdm opened this issue 10 years ago • 3 comments

I noticed that, when you use the previous/next buttons in conjunction with the provided hide/show functionality of your library, hidden tabs are still shown when navigating with the buttons.

Solution i found was changing the "baseItemSelector" to only select visible elements, like so:

Original:

var baseItemSelector = 'li:has([data-toggle="tab"])';

Modified

var baseItemSelector = 'li:has([data-toggle="tab"]):visible';

Not sure if this has any other implications, but it seemed to do the trick for me

kennethdm avatar May 29 '15 12:05 kennethdm

I also found this issue for disabled tabs. The tab / li has the disabled class added but previous navigates to the disabled tab regardless.

I only had one tab which I needed to disable on a certain condition so I simply disabled the Prev button instead in the onTabShow event if the condition was met for that tab.

mflalor avatar Aug 06 '15 03:08 mflalor

https://github.com/VinceG/twitter-bootstrap-wizard/pull/140

patrickbrouwers avatar Sep 17 '15 12:09 patrickbrouwers

I am facing same issue as @mflalor do. Also I can click on the disabled tab, even if it is disabled.

amitpatelx avatar Nov 26 '15 09:11 amitpatelx