diff --git a/core/modules/toolbar/js/views/ToolbarVisualView.js b/core/modules/toolbar/js/views/ToolbarVisualView.js index c3b0c85..5efc5d6 100644 --- a/core/modules/toolbar/js/views/ToolbarVisualView.js +++ b/core/modules/toolbar/js/views/ToolbarVisualView.js @@ -245,14 +245,26 @@ */ adjustPlacement: function () { var $trays = this.$el.find('.toolbar-tray'); + var orientation = this.model.get('orientation'); if (!this.model.get('isOriented')) { $trays.css('margin-top', 0); + $trays.find('.toolbar-lining').css('margin-bottom', 0); $trays.removeClass('toolbar-tray-horizontal').addClass('toolbar-tray-vertical'); } else { // The toolbar container is invisible. Its placement is used to // determine the container for the trays. - $trays.css('margin-top', this.$el.find('.toolbar-bar').outerHeight()); + var height = this.$el.find('.toolbar-bar').outerHeight(); + $trays.css('margin-top', height); + if (orientation == 'vertical') { + $trays.find('.toolbar-lining') + .css('margin-bottom', height) + .css('min-height', 'calc(100% - ' + height + 'px)'); + } + else { + $trays.find('.toolbar-lining').css('margin-bottom', 0); + Drupal.displace(); + } } },