Change treeview overflow on completion shown

When the dropdown is shown in a treeview, if there is no enough space in the
treeview, the browser adds a scrollbar to the treeview instead of expanding the
height of the treeview (and let the general scrollbar managed it). This is
because the treeview has an auto overflow-x which lead to set also the same to
overflow-y.
This commit is contained in:
Cédric Krier committed 2015-10-16 13:49:19 +02:00
1 parent 4ee1440a09
commit a7abd832bf
1 file changed
+9 -1
+9 -1
View File
@@ -2986,8 +2986,16 @@
}
}
}.bind(this));
this.menu.on('hide.bs.dropdown', function() {
// We must set the overflow of the treeview containing the input to
// visible to prevent vertical scrollbar inherited from the auto
// overflow-x
// (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', '');
}.bind(this));
this.dropdown.on('show.bs.dropdown', function() {
this.input.closest('.treeview').css('overflow', 'visible');
}.bind(this));
},
set_actions: function(actions, action_activated) {