Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizontal Scroll Bars on iOS Safari Powerflow iFrame #139

Closed
cwagz opened this issue Dec 3, 2022 · 1 comment
Closed

Horizontal Scroll Bars on iOS Safari Powerflow iFrame #139

cwagz opened this issue Dec 3, 2022 · 1 comment

Comments

@cwagz
Copy link
Contributor

cwagz commented Dec 3, 2022

Hi @jasonacox - I noticed the width was set back to "400" on the iframe when the firmware version was added. This brought back the horizontal scroll bars that can accidentally be triggered when trying to scroll down the dashboard on iOS Safari. I mainly review the dashboard from my iPhone so I noticed it right away.

For all of my devices setting this width to "100%" makes the scroll bars go away and seems to help center all the text better horizontally as well. I was just curious if this had caused issues for other people or if it was changed back to 400 by mistake.

I know the dashboard does not seem to render very well on an iPad, but this seemed to be the case regardless of the width of the iframe.

You can see the change here with width="100%"

<div style="text-align: center">
<iframe id="frame" src="/public/img/grafana_icon.svg" width="100%" height="290" frameBorder="0">No</iframe>
<p class="version" style="color:gray;">Firmware</p>
<script>
// Get Firmware Version
function showversion() {
    var pwver = window.location.protocol + "//" + window.location.hostname + ":8675/version";
    $.getJSON(pwver, function(data) {
        var text = `Firmware: ${data.version.split(" ")[0]}`;
        $(".version").html(text);
    });
    setTimeout(showversion, 60000);
}
var pwurl = window.location.protocol + "//" + window.location.hostname + ":8675/";
document.getElementById('frame').src = pwurl;
showversion();
</script>
</div>
@cwagz cwagz changed the title Horizontal Scroll Bars on iOS Safaris Powerflow iFrame Horizontal Scroll Bars on iOS Safari Powerflow iFrame Dec 3, 2022
@jasonacox
Copy link
Owner

Oops! That was a mistake. I don't know how I missed your change in my update. I'll add width="100%" back.

jasonacox added a commit that referenced this issue Dec 3, 2022
@cwagz cwagz closed this as completed Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants