Verified Commit 41943e87 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3409505 by sakiland, wendell, malik.kotob, darko_antunovic, KlemenDEV,...

Issue #3409505 by sakiland, wendell, malik.kotob, darko_antunovic, KlemenDEV, longwave, Taran2L, tyler36, smustgrave, jhedstrom, mindaugasd: [regression] Uncaught TypeError: Cannot read properties of null (reading 'style') (toolbar.js)
parent e0004882
Loading
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@
        $(window).on({
          'dialog:aftercreate': (event, dialog, $element, settings) => {
            const toolbarBar = document.getElementById('toolbar-bar');
            if (toolbarBar) {
              toolbarBar.style.marginTop = '0';

              // When off-canvas is positioned in top, toolbar has to be moved down.
@@ -224,10 +225,13 @@
                  toolbarBar.style.marginTop = `${newHeight}px`;
                });
              }
            }
          },
          'dialog:beforeclose': () => {
            const toolbarBar = document.getElementById('toolbar-bar');
            if (toolbarBar) {
              toolbarBar.style.marginTop = '0';
            }
          },
        });
      });