10.03.2025, 06:09
(06.03.2025, 15:05)admin Wrote: You need to replace only the doShowPlan function not the whole JS code. Complete JS should look like this:
Code:12345678910111213141516var origDoShowPlan = window.doShowPlan if (origDoShowPlan) { var scrolIds = [2, 3, 4] $(function() { scrolIds.forEach(function(id) { $('#plan-' + id).addClass('layer-centered-h') }) }) doShowPlan = function(plan) { visAutoWidth = scrolIds.indexOf(currentPlanId) >= 0 $('.layers').css('overflow-y', visAutoWidth ? 'auto' : 'hidden'); origDoShowPlan(plan) } }
Ok, now I can switch between plans but the behaviour is the same than using the other code... if I don't open any widget it works fine, but after openning a widget scroll bar appears to non scrollable plans...
As a workaround we've forced a page reload when a widget is closed... It's not the best way but it's the only one we've found to avoid it...