[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
This commit is contained in:
Nicolas Lempereur
2019-02-20 10:39:17 +00:00
parent 2b1d3ff82d
commit 8183f92de4
@@ -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');
});