[FIX] widget html: rendering issue in mail composer on Firefox
authorDenis Ledoux <dle@odoo.com>
Tue, 23 Sep 2014 16:53:17 +0000 (18:53 +0200)
committerDenis Ledoux <dle@odoo.com>
Tue, 23 Sep 2014 16:53:17 +0000 (18:53 +0200)
The cleditor width does not include the margins. Setting 100% will make the editable area too large (104%) on Firefox (opw 611700).
This issue was already fixed in newer releases, from commit 9247c37de7d67beb479905e218656665dc12391f
Nevertheless, it introduced a new issue: while editing the form, the content of widgets html which were located in hidden notebook pages weren't displayed when displaying the page content.
opw-614448

addons/web/static/src/js/view_form.js

index 08050c7..439aaf0 100644 (file)
@@ -2720,7 +2720,7 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc
         if (! this.get("effective_readonly")) {
             self._updating_editor = false;
             this.$textarea = this.$el.find('textarea');
-            var width = ((this.node.attrs || {}).editor_width || '100%');
+            var width = ((this.node.attrs || {}).editor_width || 'calc(100% - 4px)');
             var height = ((this.node.attrs || {}).editor_height || 250);
             this.$textarea.cleditor({
                 width:      width, // width not including margins, borders or padding