Fixing for #791
Added a padding-right 20px in css Added a js event listener on search box to dien it on focus and reduce it on blur
Cette révision appartient à :
Parent
25c40d6d5c
révision
c533f5b398
2 fichiers modifiés avec 12 ajouts et 2 suppressions
|
@ -115,7 +115,7 @@ select.form-input {
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
.form-input.search-box { margin-right: -20px; }
|
||||
.form-input.search-box { margin-right: -20px; padding-right: 20px; }
|
||||
.form-input.search-box + .search-icon {
|
||||
left: -5px;
|
||||
position: relative;
|
||||
|
|
|
@ -76,6 +76,16 @@ window.onload = function() {
|
|||
var shiftWindow = function() { scrollBy(0, -70) };
|
||||
if (location.hash) shiftWindow();
|
||||
window.addEventListener("hashchange", shiftWindow);
|
||||
|
||||
document.getElementsByClassName("search-box")[0].addEventListener("focus", function (e) {
|
||||
var w = document.getElementsByClassName("h-user")[0].offsetWidth;
|
||||
document.getElementsByClassName("h-user")[0].style.display = "none";
|
||||
document.getElementsByClassName("search-box")[0].style.width = document.getElementsByClassName("search-box")[0].offsetWidth + w + "px";
|
||||
});
|
||||
document.getElementsByClassName("search-box")[0].addEventListener("blur", function (e) {
|
||||
document.getElementsByClassName("search-box")[0].style.width = "";
|
||||
document.getElementsByClassName("h-user")[0].style.display = "inline-block";
|
||||
});
|
||||
};
|
||||
|
||||
function playVoice() {
|
||||
|
@ -86,4 +96,4 @@ function playVoice() {
|
|||
nyanpassu.volume = 0.5;
|
||||
nyanpassu.play();
|
||||
}
|
||||
}
|
||||
}
|
Référencer dans un nouveau ticket