[FIX] barcodes: Whitelist search inputs

Before this patch, on mobile chrome, if user had focused in a `<input type=search>` element and writes something, the value never lands in the target input element and the on-screen keyboard hides.

closes odoo/odoo#37843

X-original-commit: 12d4040b7196ae8f7a27d0081638413b52340019
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Jairo Llopis
2019-10-02 18:41:01 +00:00
committed by fw-bot
parent c780caae50
commit 379f6410c1
@@ -219,7 +219,7 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, {
*/
_listenBarcodeScanner: function (e) {
if ($(document.activeElement).not('input:text, textarea, [contenteditable], ' +
'[type="email"], [type="number"], [type="password"], [type="tel"]').length) {
'[type="email"], [type="number"], [type="password"], [type="tel"], [type="search"]').length) {
$('body').append(this.$barcodeInput);
this.$barcodeInput.focus();
}