diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-07-16 15:24:02 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-07-17 09:53:30 +0200 |
| commit | 16eb36ff45bec31cfb98865b739c34e0a513a02f (patch) | |
| tree | cebe52ba39aacb0f924f8ce447f9827239adb9a9 /addons/web/static/src/js/action_manager.js | |
| parent | c22d75bdc541919a1dc861645d1e0306ab62be9c (diff) | |
[IMP] web: use a classname to show/hide widgets
The problem of $el.show()/hide() is that calling show() on a jQuery element on which
there is no display rule in the stylesheet automatically sets 'display: block'.
However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet
applied, meaning that calling show() will set its display to block (in inline style),
even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the
priority over the stylesheet, the correct display won't be applied, even when the widget
will be appended in the DOM, resulting in a possibly broken layout.
Diffstat (limited to 'addons/web/static/src/js/action_manager.js')
| -rw-r--r-- | addons/web/static/src/js/action_manager.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/action_manager.js b/addons/web/static/src/js/action_manager.js index e3d2b589f27..0d0fa6f4201 100644 --- a/addons/web/static/src/js/action_manager.js +++ b/addons/web/static/src/js/action_manager.js @@ -252,7 +252,7 @@ var ActionManager = Widget.extend({ // Hide the old_widget as it will be removed from the DOM when it // is destroyed if (old_widget) { - old_widget.$el.hide(); + old_widget.do_hide(); } if (options.clear_breadcrumbs) { self.clear_action_stack(to_destroy); |
