Bug #10911
closedBandwidthd iframe not resizing in 2.4.5/2.4.5p1
0%
Description
Forum thread from several posters: https://forum.netgate.com/topic/152323/bandwidthd-in-pfsense-2-4-5
Looking at 2.4.4 the iframe tag is rendered as:
<iframe id="bandwidthd" src="/bandwidthd/index.html" scrolling="no" style="overflow: hidden; width: 100%; height: 15882px; max-width: 100%;"></iframe>
On 2.4.5 it is:
<iframe id="bandwidthd" src="/bandwidthd/index.html" scrolling="no" style="overflow:hidden; width: 100%;*height: 10*%; max-width: 100%;"></iframe>
Firefox's scripting Console shows the script error:
Uncaught TypeError: e.indexOf is not a function load jQuery <anonymous> https://router-building/diag_bandwidthd.php:274
...which is line "$('#bandwidthd').load(function() {" in the HTML.
Side note I suspect isn't related since it was this way on 2.4.4p3, per https://github.com/pfsense/FreeBSD-ports/commit/183cabc59ca0b65368d1a8f6ffe967f80a46a6d2#diff-24986f02c41aa576cbf334c961135ee3 this is at the bottom of the page:
<?php include("foot.inc"); ?> <script> $('#bandwidthd').load(function() { /* Find height of iframe contnet and then add 20px for padding */ $(this).height( $(this).contents().find("body").height() + 20 ); }); </script>
It renders as:
<script type="text/javascript">CsrfMagic.end();</script></body> *</html>* <script> $('#bandwidthd').load(function() { /* Find height of iframe contnet and then add 20px for padding */ $(this).height( $(this).contents().find("body").height() + 20 ); }); </script>
...with the script after the </html>. Firefox marks this as "stray start tag 'script'" in its View Page Source.
Updated by Viktor Gurov over 3 years ago
Updated by Renato Botelho over 3 years ago
- Status changed from New to Feedback
- Assignee set to Renato Botelho
PR has been merged. Thanks!
Updated by Max Leighton over 3 years ago
- Status changed from Feedback to Resolved
Tested pfSense-pkg-bandwidthd-0.7.4_3 in Chrome, Edge, Firefox with no sizing issues. Working as expected. Marking the ticket resolved.