Platform increases height erroneously of divs as part of the automatic resizing processes, for Legacy modules #562
Labels
Priority:Important
Issues & PRs that are important; broken functions; errors; there are workarounds
Severity: Moderate
Minor Impact
Type: Bug
Something isn't working
Issue
We are migrating v7 modules to legacy mode in v8. We experienced that for certain cases, the height of the window just keeps getting bigger and bigger.
We have identified the cause in the file "public\dist\dist_core_fesm2022_core_mjs-_4dac1.f864533fa242990d.js" (although it can be also reproduced with other stamps adter the "_mjs-".
The location of the "issue" is "addBodyResizeListener()" and specifically in the second getheight:
As one can see above, in the process of "auto-resizing", the height of the element is just constantly increased with 150 pixels within the "bootstrap-container". This results in legacy modules windows to just keep incrementing. Besides being ugly, it just killes the calculations when you want to center for example a pop-up or do any other viewport of window-height calculation.
One way to reproduce this in the suitecrm demo is the following:
Go to Reports, create a report, and then with Chrome, in the div with classes “aor-tab-content panel panel-default”, add an inline style:
height: calc(100vh - 400px);
(This will supersede the fix height defined)
If you now click on any of the fields or module tree elements, you will see that the height of that div just keeps increasing.
I am not sure if the same issue applies to the other height function where 200px are added, but in the legacy modules tested, that one did not have any impact.
Possible Fix
It´s unclear if there is a reason in non-legacy modules to add 150 pixels to the div (footer ?)
For legacy modules, (and also for the example explained above, all works fine if the 150 pixels are not added.
Alternatively, the function could check if the "element/view" is in "legacy mode" (unclear what the best way would be to do this) and only add the 150px if not in legacy mode.
Steps to Reproduce the Issue
Context
We are migrating a number of modules to v8 (legacy mode). We have already changed some code to "cope" with this issue in a less than ideal way, but for some other modules, not being able to calculate the height of the viewport is really a big issue.
From an end-user perspective, the window just getting bigger and bigger is really impacting.
Version
Tested on 8.6.2 and 8.7.0
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
MySQL, PHP 8.2
Operating System and Version
Windows
The text was updated successfully, but these errors were encountered: