From ad78759393c475161add577dc53a24f5dcb10de1 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Fri, 9 Jun 2023 10:11:31 +0200 Subject: [PATCH] Handle no action buttons in the toolbar edge case [SCI-8626] Co-authored-by: Sboursen --- app/javascript/vue/components/action_toolbar.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/vue/components/action_toolbar.vue b/app/javascript/vue/components/action_toolbar.vue index d8e32038a..110d97a2d 100644 --- a/app/javascript/vue/components/action_toolbar.vue +++ b/app/javascript/vue/components/action_toolbar.vue @@ -92,7 +92,10 @@ this.buttonOverflow = false; this.$nextTick(() => { - if (!this.$el.getBoundingClientRect) return; + if ( + !(this.$el.getBoundingClientRect && + document.querySelector('.sn-action-toolbar__action:last-child')) + ) return; let containerRect = this.$el.getBoundingClientRect(); let lastActionRect = document.querySelector('.sn-action-toolbar__action:last-child').getBoundingClientRect();