details:   https://code.tryton.org/tryton/commit/ab474504efaf
branch:    default
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
diffstat:

 sao/src/view/tree.js |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r eb69b6d42d1b -r ab474504efaf 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
@@ -119,9 +119,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',
@@ -936,6 +933,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;

Reply via email to