changeset aff541ebcb25 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=aff541ebcb25
description:
        Remove max-height on treeview to display dropdown

        As the optional scrollbar of the treeview will be removed, the dropdown 
input
        may no more be visible. So we must scroll until it is visible.

        issue8509
        review285581002
diffstat:

 src/common.js |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 86a41bc1deea -r aff541ebcb25 src/common.js
--- a/src/common.js     Thu Jul 25 10:16:31 2019 +0200
+++ b/src/common.js     Thu Jul 25 10:18:51 2019 +0200
@@ -3267,14 +3267,20 @@
             // (see http://www.w3.org/TR/css-overflow-3/#overflow-properties)
             this.dropdown.on('hide.bs.dropdown', function() {
                 this.input.focus();
-                this.input.closest('.treeview').css('overflow', '');
+                this.input.closest('.treeview')
+                    .css('overflow', '')
+                    .css('max-height', '');
                 this.input.closest('.modal-body').css('overflow', '');
                 this.input.closest('.navbar-collapse.in').css('overflow-y', 
'');
+                this.input[0].scrollIntoView();
             }.bind(this));
             this.dropdown.on('show.bs.dropdown', function() {
-                this.input.closest('.treeview').css('overflow', 'visible');
+                this.input.closest('.treeview')
+                    .css('overflow', 'visible')
+                    .css('max-height', 'none');
                 this.input.closest('.modal-body').css('overflow', 'visible');
                 this.input.closest('.navbar-collapse.in').css('overflow-y', 
'visible');
+                this.input[0].scrollIntoView();
             }.bind(this));
         },
         set_actions: function(actions, action_activated) {

Reply via email to