[FIX] web: disable browser autocompletion for AutoComplete component

- Before this commit
The browser autocompletion feature may conflict with
the AutoComplete component. First, the browser could
display its own autocompletion dropdown over our component's.
Secondly, selecting an item in the browser's autocompletion
dropdown simulates a keydown event with an undefined 'key' property,
leading to display traceback when the AutoComplete component
uses the keydown event (i.e. in getActiveHotkey).

- After this commit
The <input/> of our AutoComplete component now has the following attr
`autocomplete="off"`. This disables the browser's autocompletion feature
for this <input/>.

Part-of: odoo/odoo#98840
This commit is contained in:
Bruno Boi
2022-08-25 12:05:24 +02:00
parent 05a4c4ad0e
commit d56468eb66
@@ -7,6 +7,7 @@
type="text"
t-att-id="props.id"
class="o-autocomplete--input o_input"
autocomplete="off"
t-att-placeholder="props.placeholder"
t-model="state.value"
t-on-blur="onInputBlur"