Closed
Description
Describe the bug
When using the b-form-tags
component, if you use an id
or input-id
that starts with a number, it throws a DOMException
when attempting to add a new tag.
Steps to reproduce the bug
- Go to The tags docs (https://bootstrap-vue.org/docs/components/form-tags)
- Click on the first live example, add a number to the start of the
id
prop (1-tags-basic
)
<template>
<div>
<label for="tags-basic">Type a new tag and press enter</label>
<b-form-tags input-id="1-tags-basic" v-model="value" class="mb-2"></b-form-tags>
<p>Value: {{ value }}</p>
</div>
</template>
<script>
export default {
data() {
return {
value: ['apple', 'orange']
}
}
}
</script>
- Type a new tag and press enter.
- Note that the tag is not added. Open dev tools and observe the console error.
Expected behavior
As per HTML5 specs (https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute), digits should be usable in the id
of input elements. The component's id
and input-id
should allow for this.
Versions
Libraries:
- BootstrapVue: 2.6.1
- Bootstrap: 4.4.1
- Vue: 2.6.10