Skip to content

Conversation

scottgonzalez
Copy link
Member

Fixes #15013

@mention-bot
Copy link

@scottgonzalez, thanks for your PR! By analyzing the annotation information on this pull request, we identified @apsdehal, @arschmitz and @jzaefferer to be potential reviewers

return false;
}

if ( that.tabs.eq( index ).is( ":hidden" ) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about...

return that.tabs.eq( index ).is( ":visible" )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there are multiple failure cases, I generally like to list them out individually as failure cases, then return true at the end, but I'm fine making this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought but the :visible and :hidden selectors are pretty slow and not 100% reliable. We don't document that hidden tabs are automatically not navigable. Would it perhaps be better to leave this change out and document that you should mark hidden tabs as disabled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, for some reason switching it causes the tests to fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't document that hidden tabs are automatically not navigable.

Why would anyone ever expect a hidden tab to be navigable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think they would which is why i suggested documenting that hidden tabs should be marked disabled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jzaefferer
Copy link
Member

Besides that one thing, 👍

@scottgonzalez
Copy link
Member Author

I'm going to close this because this will result in an odd state of tabs not being marked as disabled, but also not being able to be activated properly. Instead, we should implement the hidden detection inside refresh() and set those tabs as disabled.

@scottgonzalez scottgonzalez deleted the tabs-hidden branch May 2, 2017 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants