diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-12-19 10:55:50 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-12-19 10:55:50 +0100 |
| commit | 0272bd4aecdfd44e900ba7486a1da4ecbdb74dee (patch) | |
| tree | 1955036e6fa2c635d7c57bc6cec0d2beed9faaca /addons/web/static/src/js/chrome.js | |
| parent | 7fc896564b9ebd640119dc4a5b654a19c8d8bc1f (diff) | |
[IMP] Take menu out of the rendering flow during the window resize
bzr revid: fme@openerp.com-20121219095550-8imsql4rl4up1hw2
Diffstat (limited to 'addons/web/static/src/js/chrome.js')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index ffc98693470..db418eb6827 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -813,8 +813,11 @@ instance.web.Menu = instance.web.Widget.extend({ }); } }); - var lazyreflow = _.debounce(this.reflow.bind(this), 300); - instance.web.bus.on('resize', this, lazyreflow); + var lazyreflow = _.debounce(this.reflow.bind(this), 200); + instance.web.bus.on('resize', this, function() { + self.$el.height(0); + lazyreflow(); + }); }, start: function() { this._super.apply(this, arguments); @@ -859,7 +862,7 @@ instance.web.Menu = instance.web.Widget.extend({ */ reflow: function() { var self = this; - this.$el.show(); + this.$el.height('auto').show(); var $more_container = this.$('.oe_menu_more_container').hide(); var $more = this.$('.oe_menu_more'); $more.children('li').insertBefore($more_container); |
