From 3e0b1a9e635735322b2f150875f76df7a2e4799d Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Sun, 5 Dec 2021 01:39:42 -0500 Subject: [PATCH] Fix scrolling problems with WI entries with long names/comments --- static/application.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/application.js b/static/application.js index 9a7d3d6e..0220d132 100644 --- a/static/application.js +++ b/static/application.js @@ -1849,13 +1849,21 @@ $(document).ready(function(){ // Allow drag-and-drop rearranging of world info entries (via JQuery UI's "sortable widget") $(".wifolderhandle").on("mousedown", function () { $(".wilistitem, .wisortable-dummy").addClass("wisortable-excluded-dynamic"); + // Prevent WI folders with extremely long names from filling the screen and preventing scrolling + $(this).parent().parent().find(".wisortable-body").addClass("hidden"); + $(this).parent().css("max-height", "200px").find(".wifoldername").find(".form-control").css("max-height", "181px"); }).on("mouseup", function () { $(".wisortable-excluded-dynamic").removeClass("wisortable-excluded-dynamic"); + $(this).parent().parent().find(".wisortable-body").removeClass("hidden"); + $(this).parent().css("max-height", "").find(".wifoldername").find(".form-control").css("max-height", ""); }); $(".wihandle:not(.wifolderhandle)").on("mousedown", function () { $(".wisortable-container").addClass("wisortable-excluded"); + // Prevent WI entries with extremely long comments from filling the screen and preventing scrolling + $(this).parent().css("max-height", "200px").find(".wicomment").find(".form-control").css("max-height", "110px"); }).on("mouseup", function () { $(".wisortable-excluded-dynamic").removeClass("wisortable-excluded-dynamic"); + $(this).parent().css("max-height", "").find(".wicomment").find(".form-control").css("max-height", ""); }); $("#gamescreen").sortable({ items: "#wimenu .wisortable-body > :not(.wisortable-excluded):not(.wisortable-excluded-dynamic), #wimenu .wisortable-container[folder-uid]:not(.wisortable-excluded):not(.wisortable-excluded-dynamic)",