vasyabigi / angular-slick

Angular directive for slick-carousel
http://vasyabigi.github.io/angular-slick/
MIT License
500 stars 237 forks source link

The tabIndex cannot back from -1 to 0 #125

Open benjaminliugang opened 9 years ago

benjaminliugang commented 9 years ago

Currently, I try to only set current item's elements tabIndex as 0, the other items set as -1, when navigate to a new item just set the new item's elements tabIndex from -1 to 0. But it seems for button and a tags do not work. The slick plugin will set both of the tags tabIndex as -1. Both of the tags cannot restore to 0.

phazei commented 8 years ago

Hmm, not sure if we have the same issue, but I had something similar I fixed with:

            scope.onAfterChange = function() {
                $timeout(function() {
                    angular.element(element).find('.tab-button a').prop('tabindex', 1);
                });
            };

            <slick on-after-change="onAfterChange()">