Allow tag cancelation (#6436)

* add e2e test

* remove visual test as we can cover this with functional tests
This commit is contained in:
Scott Bell
2023-03-15 21:08:54 +04:00
committed by GitHub
parent 8df81f0ea9
commit 817d8da3e4
5 changed files with 44 additions and 81 deletions

View File

@ -150,7 +150,7 @@ export default {
},
hideOptions(newValue) {
if (!newValue) {
// adding a event listener when the hideOpntions is false (dropdown is visible)
// adding a event listener when the hideOptions is false (dropdown is visible)
// handleoutsideclick can collapse the dropdown when clicked outside autocomplete
document.body.addEventListener('click', this.handleOutsideClick);
} else {
@ -242,7 +242,6 @@ export default {
// dropdown is visible, this will collapse the dropdown.
const clickedInsideAutocomplete = this.autocompleteInputAndArrow.contains(event.target);
if (!clickedInsideAutocomplete && !this.hideOptions) {
this.$emit('autoCompleteBlur');
this.hideOptions = true;
}
},