Regex in Util.getSelectorFromElement is too restrictive
Created by: ditiem
In this line (v4-alpha code)
tab.js: 90: let selector = Util.getSelectorFromElement(this._element)
decided which pane will be selected when clicking on the "tab". Inside the getSelectorFromElement, if not data-target is provided, the href attribute is inspected. In order to decide if the selector is valid, a regular expression is used.
I generated a "fake uuid" in my code and found out:
/^#[a-z]/i.test("#8828a412-2185-4d9c-9073-81272784c4a1") returns false
/^#[a-z]/i.test("#e58329c1-e759-4661-9ae9-c33a12b8c0b6") returns true
(the reason is that in the first selector the first character is a number rather than a letter.)
So sometimes the tab was selected and sometimes not!
An expression like /^#[a-z1-9]/i should work, but I suspect there will be more cases to take into consideration.