Add cancel adding tag mechanism and fix persistent options visible (#6273)

* Add cancel adding tag mechanism and fix persistent options visible

* Add functional test for cancel adding a tag

* Create addtag.visual.spec.js and move createNotebookAndEntry to appActions.js

* Remove createDomainObjectWithDefaults function from tags.e2e.spec.js

* Integrate Percy snapshots and remove assertions

* Move createNotebookAndEntry function back to tags.e2e.spec.js

* Update locator of Annotations tab, split helper function and add test.beforeEach
This commit is contained in:
Marcelo Arias
2023-02-07 12:24:37 -05:00
committed by GitHub
parent 2f6e1b703a
commit 5b1f8d0eac
5 changed files with 105 additions and 4 deletions

View File

@ -42,7 +42,7 @@
></div>
</div>
<div
v-if="!hideOptions"
v-if="!hideOptions && filteredOptions.length > 0"
class="c-menu c-input--autocomplete__options"
aria-label="Autocomplete Options"
@blur="hideOptions = true"
@ -230,10 +230,10 @@ export default {
this.showFilteredOptions = false;
this.autocompleteInputElement.select();
if (this.hideOptions) {
this.showOptions();
} else {
if (!this.hideOptions && this.filteredOptions.length > 0) {
this.hideOptions = true;
} else {
this.showOptions();
}
},
@ -242,6 +242,7 @@ 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;
}
},