details: https://code.tryton.org/tryton/commit/46e8d8a5a074
branch: 8.0
user: Cédric Krier <[email protected]>
date: Wed Oct 14 12:26:20 2026 +0200
description:
Set the display of tree-container to grid only when the screen has a
parent
The hack is only needed when the tree view is inside a container with a
grid
template. This can be deduced by having a parent.
Closes #15167
(grafted from ab474504efaf2d0991da334a60f55c3b5730040d)
diffstat:
sao/src/view/tree.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r a2b335a4672a -r 46e8d8a5a074 sao/src/view/tree.js
--- a/sao/src/view/tree.js Tue Aug 18 14:55:59 2026 +0000
+++ b/sao/src/view/tree.js Wed Oct 14 12:26:20 2026 +0200
@@ -117,9 +117,6 @@
this.el = jQuery('<div/>', {
'class': 'tree-container',
})
- // Prevent Chrome based browser to compute a min-content
- // such that only this table has scrollbar if needed
- .css('display', 'grid');
this.scrollbar = jQuery('<div/>')
.appendTo(jQuery('<div/>', {
'class': 'scrollbar responsive',
@@ -938,6 +935,12 @@
this.screen.button(button.attributes);
},
display: function(selected, expanded) {
+ if (this.screen.group.parent) {
+ // Prevent Chrome based browser to compute a min-content
+ // such that only this table has scrollbar if needed
+ this.el.css('display', 'grid');
+ }
+
if ((this.display_size === null) && this.screen.group.length) {
if (this.screen.group.parent) {
this.display_size = 0;