@cloudron/pankow 3.5.17 → 3.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -138,12 +138,16 @@ function onOpen(event) {
|
|
|
138
138
|
menu.value.open(event, elem.value);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
function onClose(
|
|
141
|
+
function onClose() {
|
|
142
|
+
elem.value.focus();
|
|
143
|
+
emits('close');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function onEscape(event) {
|
|
142
147
|
if (menu.value.isOpen) {
|
|
143
|
-
|
|
144
|
-
if (event) event.stopPropagation();
|
|
148
|
+
event.stopPropagation();
|
|
145
149
|
menu.value.close();
|
|
146
|
-
|
|
150
|
+
onClose();
|
|
147
151
|
}
|
|
148
152
|
}
|
|
149
153
|
|
|
@@ -154,7 +158,7 @@ onMounted(() => {
|
|
|
154
158
|
</script>
|
|
155
159
|
|
|
156
160
|
<template>
|
|
157
|
-
<div class="pankow-multiselect" :class="{ 'pankow-multiselect-disabled': disabled }" ref="elem" tabindex="0" @click="onClick" @keydown.enter="onOpen" @keydown.down.stop="onOpen" @keydown.up.stop="onOpen" @keydown.esc="
|
|
161
|
+
<div class="pankow-multiselect" :class="{ 'pankow-multiselect-disabled': disabled }" ref="elem" tabindex="0" @click="onClick" @keydown.enter="onOpen" @keydown.down.stop="onOpen" @keydown.up.stop="onOpen" @keydown.esc="onEscape">
|
|
158
162
|
<!-- native select for required and accessibility handling -->
|
|
159
163
|
<select ref="nativeSelect" :required="$attrs['required']" multiple style="display: none">
|
|
160
164
|
<option value=""></option>
|