diff --git a/src/components/Select.vue b/src/components/Select.vue index e8710f6..056c321 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -215,7 +215,8 @@ cursor: pointer; } .v-select input[type="search"].hidden { - display: none; + width: 0px; + padding: 0; } .v-select input[type="search"].shrunk { width: auto; @@ -989,7 +990,7 @@ */ inputClasses() { return { - hidden: !this.multiple && !this.isValueEmpty, + hidden: !this.multiple && !this.isValueEmpty && !this.dropdownOpen, shrunk: this.multiple && !this.isValueEmpty, empty: this.isValueEmpty, } diff --git a/test/unit/specs/Select.spec.js b/test/unit/specs/Select.spec.js index e2d152d..348382f 100644 --- a/test/unit/specs/Select.spec.js +++ b/test/unit/specs/Select.spec.js @@ -1377,6 +1377,28 @@ describe('Select.vue', () => { expect(vm.$children[0].inputClasses.shrunk).toEqual(false) }) + + it('should not apply the "hidden" class to the search input when a value is present, and the dropdown is open', () => { + const vm = new Vue({ + template: '