Handle no action buttons in the toolbar edge case [SCI-8626]

Co-authored-by: Sboursen <dev.sboursen@gmail.com>
This commit is contained in:
sboursen-scinote 2023-06-09 10:11:31 +02:00
parent 7c84ecb108
commit ad78759393

View file

@ -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();