Skip to content
Snippets Groups Projects
Commit 2d3a45dc authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issues/13328' into 'develop'

REDMINE_ISSUE-13328

See merge request !324
parents 16d46c5d 311dccfa
No related branches found
No related tags found
2 merge requests!424version 3.1.0,!324REDMINE_ISSUE-13328
...@@ -125,11 +125,10 @@ export default { ...@@ -125,11 +125,10 @@ export default {
methods: { methods: {
toggleDropdown(val) { toggleDropdown(val) {
if (this.isOpen) { if (this.isOpen) { //* if dropdown is open :
this.input = ''; // * clear input field when closing dropdown this.input = ''; // * -> clear input field when closing dropdown
} else if (this.search) { } else if (this.search) { //* if dropdown is closed is a search dropdown:
//* focus on input if is a search dropdown this.$refs.input.focus({ //* -> focus on input field
this.$refs.input.focus({
preventScroll: true, preventScroll: true,
}); });
} else if (this.clearable && val.target && this.selected) { } else if (this.clearable && val.target && this.selected) {
...@@ -172,8 +171,9 @@ export default { ...@@ -172,8 +171,9 @@ export default {
}, },
clickOutsideDropdown(e) { clickOutsideDropdown(e) {
if (!e.target.closest(`#custom-dropdown${this.identifier}`)) if (!e.target.closest(`#custom-dropdown${this.identifier}`) && this.isOpen) {
this.toggleDropdown(false); this.toggleDropdown(false);
}
}, },
}, },
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment