Hi developers,

I see following Javascript error in Geoserver admin gui, when resizing
the window.

Uncaught TypeError: Cannot set property 'disabled' of null
    at resizeStylePage (VM840
jquery.fullscreen-ver-D69DCBA0FF6B036BBEEE78538C81855F.js:22)

geoserver-2.17.0\src\web\core\src\main\java\org\geoserver\web\js\jquery.fullscreen.js:22
is
document.getElementById('cm_editor_heigth').disabled=false;

cm_editor_heigth is (only) available in StyleEditorPage. So on other
pages getElementById('cm_editor_heigth') is null !

Maybe it would be better to change jquery.fullscreen.js on line 17 to

if (document.getElementById('cm_editor_heigth')) {
     document.getElementById('cm_editor_heigth').disabled=true;
}

andon line 28 to

if (document.getElementById('cm_editor_heigth')) {
     document.getElementById('cm_editor_heigth').disabled=false;
}

Existing code:

        if (isFullscreen) {
            document.getElementById('cm_editor_heigth').disabled=true;
            if (document.gsEditors) {
                //update the default to the old value
                editorDefault = 
document.gsEditors["editor"].getWrapperElement().offsetHeight;
            }
            document.gsEditors["editor"]
            editorHeight = Math.max(300, windowHeight - editorMargin);
            previewHeight = Math.max(300, windowHeight - previewMargin);
        } else {
            document.getElementById('cm_editor_heigth').disabled=false;
        }
        if (document.gsEditors) {
            var editor = document.gsEditors["editor"];
            editor.setSize("100%", editorHeight);
            editor.refresh();
        }
Stefan


-- 
Dipl. Ing. Stefan Overkamp
Laakmannsbusch 44, 42555 Velbert 
tel.: 0177 / 79 76 159
[email protected]

_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to