From 8c28a21cdeddc6c7b38b51593c05295ae5099f42 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 5 Dec 2024 18:55:03 +0300 Subject: [PATCH] [SSE] Fix Bug 71960 --- apps/spreadsheeteditor/main/app/view/Statusbar.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index e9edd1c018..e501a50dbb 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -678,8 +678,11 @@ define([ var tabEl = tab.$el; this.tabMenu.atposition = function () { + var parentEl = tabEl.parent(); + if (parentEl.length<1) return; + var rect = Common.Utils.getBoundingClientRect(tabEl.get(0)), - parentPos = Common.Utils.getOffset(tabEl.parent()); + parentPos = Common.Utils.getOffset(parentEl); return { top : rect.top, left: rect.left - parentPos.left - 2, @@ -700,7 +703,7 @@ define([ onTabMenuAfterShow: function (obj) { if (obj.atposition) { var pos = this.tabMenu.atposition(); - obj.setOffset(Common.UI.isRTL() ? (pos.right - $(obj.el).width()) : pos.left); + pos && obj.setOffset(Common.UI.isRTL() ? (pos.right - $(obj.el).width()) : pos.left); } this.enableKeyEvents = true;