aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/modules/aria/dropdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/modules/aria/dropdown.js')
-rw-r--r--web_src/js/modules/aria/dropdown.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/modules/aria/dropdown.js b/web_src/js/modules/aria/dropdown.js
index e4c881b6af..26c1352416 100644
--- a/web_src/js/modules/aria/dropdown.js
+++ b/web_src/js/modules/aria/dropdown.js
@@ -132,6 +132,11 @@ function attachInit($dropdown) {
const $focusable = $textSearch.length ? $textSearch : $dropdown; // the primary element for focus, see comment above
if (!$focusable.length) return;
+ // as a combobox, the input should not have autocomplete by default
+ if ($textSearch.length && !$textSearch.attr('autocomplete')) {
+ $textSearch.attr('autocomplete', 'off');
+ }
+
let $menu = $dropdown.find('> .menu');
if (!$menu.length) {
// some "multiple selection" dropdowns don't have a static menu element in HTML, we need to pre-create it to make it have correct aria attributes