Commit c46b5bb4 authored by Jürgen Haas's avatar Jürgen Haas Committed by Sascha Eggenberger
Browse files

Issue #3352849: stickyPosition in tableheader.js throwd exception when...

Issue #3352849: stickyPosition in tableheader.js throwd exception when permission "Access toolbar" is not granted
parent b0c3488f
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -34,7 +34,11 @@
    stickyPosition: () => {
      let offsetTop = 0;
      if (!document.body.classList.contains('gin--classic-toolbar')) {
        offsetTop = document.querySelector('#gin-toolbar-bar').clientHeight + document.querySelector('.region-sticky').clientHeight;
        const toolbar = document.querySelector('#gin-toolbar-bar');
        offsetTop = document.querySelector('.region-sticky').clientHeight;
        if (toolbar) {
          offsetTop += toolbar.clientHeight;
        }
      } else {
        offsetTop = document.querySelector('#toolbar-bar').clientHeight;
      }