From 8183f92de4d9c99119f78bd357a666e2efb29cd3 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 20 Feb 2019 09:38:02 +0000 Subject: [PATCH] [FIX] web: ie11 autocomplete field no open itself On IE11, in 10.0 up to master in some instance when creating a record under some conditions the dropdown may be automatically opened and need to be closed. This has been pinpointed to 90c1af1151 so it seem that a combination of fields/code/autocomplete and changing the placeholder at one time causes the issue. Since IE11 lie and say it is mozilla 11.0 we just apply the 90c1af1151 when the browser is chrome (we did no did this at first to have the same behavior accross browsers). note: there is an opened bug in chromium https://crbug.com/928305 if solved the hack could be removed completely. opw-1940592 closes #31271 --- addons/web/static/src/js/views/form_relational_widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 1dd61553ca2..7c2a704ca35 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -265,7 +265,7 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com }); // avoid ignoring autocomplete="off" by obfuscating placeholder, see #30439 - if (this.$input.attr('placeholder')) { + if ($.browser.chrome && this.$input.attr('placeholder')) { this.$input.attr('placeholder', function (index, val) { return val.split('').join('\ufeff'); });