move menucontainer into a single div, prevent text selection on dropdown elements

This commit is contained in:
mappu 2017-12-10 12:20:18 +13:00
parent 3f623782b7
commit e0ff64cd22
2 changed files with 25 additions and 7 deletions

View File

@ -182,13 +182,15 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) {
<body>
<div class="layout-top nav">
<div id="tr1" style="display:none;"></div>
<div id="tr2" style="display:none;"></div>
<div class="ddmenu" id="spm" style="display:none;">
<a href="/">Latest</a>
<a onclick="fontSize(1);">Font increase</a>
<a onclick="fontSize(-1);">Font decrease</a>
<a href="/download" onclick="return confirm('Are you sure you want to download a backup?');">Download backup</a>
<div id="menu-container" class="noselect">
<div id="tr1"></div>
<div id="tr2"></div>
<div class="ddmenu">
<a href="/">Latest</a>
<a onclick="fontSize(1);">Font increase</a>
<a onclick="fontSize(-1);">Font decrease</a>
<a href="/download" onclick="return confirm('Are you sure you want to download a backup?');">Download backup</a>
</div>
</div>
<div id="logo" class="layout-pushdown"><svg viewBox="0 0 24 24">

View File

@ -131,8 +131,24 @@ select {
margin-right:4px;
}
/* Utility class */
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
/* Dropdown */
#menu-container {
display:none; /* default */
}
.ddmenu {
display:block;
position:absolute;