[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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user