mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
fix unclosable select dropdown when clicking on dropdown (#949)
The reason for the bug was: clicking on the area blurred the search input. vue-slect relies on this event to close the dropdown. Since the click happend inside the dropdown, it did not close (which is correct). Though now the search input was blurred already, so clicking outside of the dropdown had no effect. Be preventing event propagation, the input does not get blurred anymore when clicking inside the dropdown and everything still works.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
<transition :name="transition">
|
||||
<ul ref="dropdownMenu" v-if="dropdownOpen" class="vs__dropdown-menu" role="listbox" @mousedown="onMousedown" @mouseup="onMouseUp">
|
||||
<ul ref="dropdownMenu" v-if="dropdownOpen" class="vs__dropdown-menu" role="listbox" @mousedown.prevent="onMousedown" @mouseup="onMouseUp">
|
||||
<li
|
||||
role="option"
|
||||
v-for="(option, index) in filteredOptions"
|
||||
|
||||
Reference in New Issue
Block a user