<Tab> `id`s have extra # in front: id="foo" renders to id="#foo"
DaxChen opened this issue · comments
see this on your demo page, inspect on the panel
s!
+1
Laravel Dusk won't test these malformed id attributes.
Made PR #50 to address this situation. Not really a JS ninja, but I tried to adhere to the contributing guidelines. Please forgive any faux pas.
@evanernest Note that those are not malformed in HTML5: https://mathiasbynens.be/notes/html5-id-class
You might be able to escape them in your selectors (e.g. in your tests) with (double) backslash. (document.querySelector('#\\#foo')
)
That being said, I would also say it's a bug if it becomes id="#foo" if you pass id="foo". +1
@aphofstede Thanks. That does work. Learn something new every day. I rescind the "malformed" portion of my statement.
But yeah, in my case, the component is generating the id by kebab-casing the name attribute from the <tab>
, so it seems like undesired behavior to add the '#'.
@sebastiandedeyne PR good enough to merge? May be a breaking change, since it'll probably break many people's tests and other code that references elements by ID.
Makes sense to merge imo since it was producing invalid html