2
0
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:
Markus
2019-10-26 20:42:50 +02:00
committed by Jeff Sagal
parent ceb42b4950
commit b8fbefdc2d
+1 -1
View File
@@ -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"