This is great information - can you open an issue at
https://osgeo-org.atlassian.net/projects/GEOS/issues and ideally submit a
PR with the change in it at https://github.com/geoserver/geoserver

Thanks again for your help

Ian

On Thu, 14 May 2020 at 08:45, Stefan Overkamp <[email protected]> wrote:

> 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;
> }
> and on 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 [email protected]
>
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>


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

Reply via email to