Skip to content

Commit b4fa9db

Browse files
authored
Fix auxiliary menu crash in non-English locales (#5039)
* Fix auxiliary menu crash in non-English locales * Fix ESLint/Prettier formatting in js/activity.js
1 parent 0ef47f8 commit b4fa9db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/activity.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4129,7 +4129,8 @@ class Activity {
41294129
// function to increase or decrease the "top" property of the top-right corner buttons
41304130

41314131
const topRightButtons = document.querySelectorAll("#buttoncontainerTOP .tooltipped");
4132-
const btnY = document.getElementById("Grid").getBoundingClientRect().top;
4132+
const gridElement = document.getElementById("Grid");
4133+
const btnY = gridElement ? gridElement.getBoundingClientRect().top : 70 + LEADING + 6;
41334134

41344135
this.changeTopButtonsPosition = value => {
41354136
topRightButtons.forEach(child => {

0 commit comments

Comments
 (0)