diff options
| author | Nasreddin (bon) <bon@odoo.com> | 2020-10-21 13:08:40 +0000 |
|---|---|---|
| committer | Nasreddin (bon) <bon@odoo.com> | 2020-10-21 15:40:10 +0000 |
| commit | 48d4c8185482545b049e2fecf315dd66ab9472f8 (patch) | |
| tree | f03f0e27f3a14ae089e1988cc14d7b3f1983f454 /addons/web_editor/static/src/js/editor/snippets.options.js | |
| parent | 34c16fb374a7ef9992012599bde3703c08aa1a58 (diff) | |
[FIX] web_editor: Autocomplete options can break layout
Issue
- Install "Website" app
- Go to "Contact us" page on website
- Edit Page, then click on submit button to
edit form style
- Alter 'Recipient Email' by selecting a value
from 'autocomplete' values
Other input text options are also altered.
Cause
Due to chrome autocompletition, others text input fields are
also altered (like it will do with a form address).
In this case, the error was obvious since it alter also the
'Labels Width' who break the layout.
Solution
Disable autocompletition on `<input type='text'/>` options
elements.
opw-2361169
closes odoo/odoo#60470
X-original-commit: 978788bbdf1a4a3d563fd70e2af89fdd1fd039ec
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Diffstat (limited to 'addons/web_editor/static/src/js/editor/snippets.options.js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.options.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index ae50244d7d7..d9716271528 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -1051,6 +1051,7 @@ const InputUserValueWidget = UnitUserValueWidget.extend({ const unit = this.el.dataset.unit; this.inputEl = document.createElement('input'); this.inputEl.setAttribute('type', 'text'); + this.inputEl.setAttribute('autocomplete', 'chrome-off'); this.inputEl.setAttribute('placeholder', this.el.getAttribute('placeholder') || ''); this.inputEl.classList.toggle('text-left', !unit); this.inputEl.classList.toggle('text-right', !!unit); |
