Skip to content

Commit

Permalink
[FIX] web: fix layout issue in Chrome 50
Browse files Browse the repository at this point in the history
A 100% height is not distributed anymore to the children of a table-row
if they are not themselves table-cell in Chrome 50. This breaks the
indenpendent scrolling of the menu and the view manager.

However, setting the `table-cell` display breaks the layout in Internet
Explorer.

When the webclient is loaded by Chrome 50, we load a stylesheet
forcing a `table-cell` for display.

Seems to be related to https://bugs.chromium.org/p/chromium/issues/detail?id=353580
and https://chromium.googlesource.com/chromium/src.git/+/8876584335b48c99cf8df552ef4d8efebb131041

Related to e1a9919
Fixes #11629
  • Loading branch information
sle-odoo committed Apr 18, 2016
1 parent e1a9919 commit f992c8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addons/web/static/src/css/chrome50.css
@@ -0,0 +1,8 @@
/* Do not forward port! */
.oe_leftbar > div > div > div {
display: table-cell;
}

.oe_view_manager > .oe_view_manager_wrapper > div {
display: table-cell;
}
8 changes: 8 additions & 0 deletions addons/web/static/src/js/chrome.js
Expand Up @@ -1292,6 +1292,14 @@ instance.web.WebClient = instance.web.Client.extend({
self.action_manager.do_action(self.client_options.action_post_login);
delete(self.client_options.action_post_login);
}

/* Do not forward port! */
if ($.browser.chrome) {
var chrome_version = $.browser.version.split('.')[0];
if (parseInt(chrome_version, 10) >= 50) {
openerp.loadCSS('/web/static/src/css/chrome50.css');
}
}
},
update_logo: function() {
var company = this.session.company_id;
Expand Down

3 comments on commit f992c8e

@spadae22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI,
I see issues with tree views stacked or in columns. I see this on Manufacturing Order as well as payments, tested on runbot: http://142801-8-0-f992c8.runbot8.odoo.com/web?db=142801-8-0-f992c8-all#id=2&view_type=form&model=mrp.production&menu_id=660&action=825

I was using the original fix since we do not use IE and did not see these issues. Tested on OSX and Ubuntu

screen shot 2016-04-19 at 1 20 05 am

screen shot 2016-04-19 at 1 23 17 am

@wtaferner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spadae22
I guess it is b/c table-row > table-cell, but as it might be only a workaround it is not that bad as the table expands in case it needs more space...

You might add

.oe_view_manager > .oe_view_manager_wrapper {
  display: table;
  width: 100%;
}

@spadae22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wtaferner Thanks. SInce is on the runbot, odoo should fix this issue

Please sign in to comment.