Skip to content
Browse files

[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 90c1af1 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 90c1af1
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 if
solved the hack could be removed completely.

closes #31271
  • Loading branch information...
nle-odoo committed Feb 20, 2019
1 parent 2b1d3ff commit 8183f92de4d9c99119f78bd357a666e2efb29cd3
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 ($ && this.$input.attr('placeholder')) {
this.$input.attr('placeholder', function (index, val) {
return val.split('').join('\ufeff');

0 comments on commit 8183f92

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.