diff -u b/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php --- b/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -207,7 +207,9 @@ $current_parent_count = count($form_state->getValue('parent')); // Root doesn't count if it's the only parent. if ($current_parent_count == 1) { - if ((is_array($form_state->getValue('parent'))) && $form_state->hasValue(['parent', 0]) || $form_state->getValue('parent') == 0) { + if ((is_array($form_state->getValue('parent'))) + && $form_state->hasValue(['parent', 0]) + || $form_state->getValue('parent') == 0) { $current_parent_count = 0; $form_state->setValue('parent', []); } diff -u b/core/modules/toolbar/js/views/ToolbarVisualView.js b/core/modules/toolbar/js/views/ToolbarVisualView.js --- b/core/modules/toolbar/js/views/ToolbarVisualView.js +++ b/core/modules/toolbar/js/views/ToolbarVisualView.js @@ -148,21 +148,17 @@ adjustPlacement: function adjustPlacement() { var $trays = this.$el.find('.toolbar-tray'); var orientation = this.model.get('orientation'); + if (!this.model.get('isOriented')) { $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. + } else { 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', height).css('min-height', 'calc(100% - ' + height + 'px)'); + } else { $trays.find('.toolbar-lining').css('margin-bottom', 0); Drupal.displace(); } only in patch2: unchanged: --- a/core/modules/toolbar/js/views/ToolbarVisualView.es6.js +++ b/core/modules/toolbar/js/views/ToolbarVisualView.es6.js @@ -316,11 +316,28 @@ */ adjustPlacement() { const $trays = this.$el.find('.toolbar-tray'); + const orientation = this.model.get('orientation'); if (!this.model.get('isOriented')) { + $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. + 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(); + } + } }, /**