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

[tests] Add button to testmarginbottom.html to hide bottom bar. Contributes to JB#57777 #993

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions tests/manual/testmarginbottom.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@
}
}

function isBottomBarVisible() {
return document.getElementById("fixed-bottom-bar").style.visibility != "hidden";
}

function toggleBottomBar() {
document.getElementById("fixed-bottom-bar").style.visibility = isBottomBarVisible() ? "hidden" : "visible";
document.getElementById("bottombar").firstChild.data = isBottomBarVisible() ? "Hide bottom bar" : "Show bottom bar";
}

function updateFullscreenStatus() {
var fullscreen = document.getElementById("fullscreen");
fullscreen.firstChild.data = (inFullscreen() ? "Exit fullscreen" : "Enter fullscreen");
Expand Down Expand Up @@ -168,14 +177,17 @@
left: calc(100% - 32px);
z-index: 100;
}
.fixed-bottom-bar {
#fixed-bottom-bar {
padding: 4px;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #ff0000;
width: 70%;
background: #0000ff;
color: #ffffff;
text-align: center;
left: 50%;
transform: translateX(-50%);
}
#windowsize {
color: #aaaaff;
Expand Down Expand Up @@ -207,23 +219,23 @@
<i class="arrowhead up"></i>
<i class="arrowhead down"></i>
<div id="content" class="box">
<p/><div style="width: 10px; height: 6%;"></div>
<p/><div style="width: 10px; height: 2%;"></div>
<center>
<p/><span id="windowsize"></span>
<p/><span id="contentsize"></span>
<br/>
<p/><span id="hiddenvalue" style="opacity: 0.0"></span>
<p/><input type="text" placeholder="Open keyboard #1"></input>
<p/>
<button onclick="changeheight(+16)">More content</button>
<button onclick="changeheight(-16)">Less content</button>
<p/>
<button id="fullscreen" onclick="toggleFullscreen()">Enter fullscreen</button>
<button id="bottombar" onclick="toggleBottomBar()">Hide bottom bar</button>
</center>
<iframe id="frame" src="testmarginbottom-text-input-subframe.html" align="middle"></iframe>
<input id="bottominput" type="text" placeholder="Open keyboard #3"></input>
</div>
<div class="fixed-bottom-bar">This is fixed bottom bar</div>
<center><div id="fixed-bottom-bar">This is fixed bottom bar</div></center>
</body>
</html>