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

Tabs with an identical id and href location get set to display: none #6545

Open
ChildishGiant opened this issue Apr 7, 2020 · 1 comment

Comments

@ChildishGiant
Copy link

Expected Behaviour

The href and id should be able to be the same without the tab being made invisible

Current Behaviour

If the href and id of a tab are identical (case sensitive), the tab's display is set to none.

Steps to Reproduce (for bugs)

  1. Load https://codepen.io/ChildishGiant/pen/OJVKGwR and note that the Apples tab is blanked out
  2. Change either the href or id of the apples tab (making one lowercase works)
  3. Note that the tab is now visible.

Your Environment

  • Version used: materialize 1.0.0
  • Browser Name and version: Chromium: 80.0.3987.163
  • Operating System and version: Windows 10
@doughballs
Copy link

Hi @ChildishGiant

So, I just had a think about this, and I don't think that it is a valid issue.

Actually - the href and id should NEVER be identical in this case, because then the element would be self referencing.

The only time hrefs and IDs should match is for page anchors, and even then they would never be used on the same element.

Here, clicking on a tab picks up the href and links it to he corresponding tab content. I can't think of any scenario where your use case would be valid.

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

2 participants