Better fix for per-site permissions UI glitches (thanks barbaz for reporting).
This commit is contained in:
parent
2013c8e1ae
commit
45e6d8c03d
|
@ -505,3 +505,18 @@ legend {
|
|||
#high-contrast-chooser {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hilite {
|
||||
background-color: #850 !important;
|
||||
}
|
||||
.hilite-end {
|
||||
transition: 1s background-color;
|
||||
}
|
||||
.hilite .url {
|
||||
transform: scale(2);
|
||||
transition: none;
|
||||
}
|
||||
.hilite-end .url {
|
||||
transform: none;
|
||||
transition: 1s transform;
|
||||
}
|
16
src/ui/ui.js
16
src/ui/ui.js
|
@ -897,18 +897,16 @@ var UI = (() => {
|
|||
highlight(key) {
|
||||
key = Sites.toExternal(key);
|
||||
for (let r of this.allSiteRows()) {
|
||||
if (r.querySelector(".full-address").textContent.trim().replace(/^.*:\/\/…/, '') === key) {
|
||||
let url = r.lastElementChild;
|
||||
url.style.transition = r.style.transition = "none";
|
||||
r.style.backgroundColor = "#850";
|
||||
url.style.transform = "scale(2)";
|
||||
if (key === r.siteMatch) {
|
||||
r.classList.add("hilite");
|
||||
r.querySelector("input.preset:checked").focus();
|
||||
window.setTimeout(() => {
|
||||
r.style.transition = "1s background-color";
|
||||
url.style.transition = "1s transform";
|
||||
r.style.backgroundColor = "";
|
||||
url.style.transform = "none";
|
||||
r.classList.remove("hilite");
|
||||
r.classList.add("hilite-end");
|
||||
r.scrollIntoView();
|
||||
window.setTimeout(() => {
|
||||
r.classList.remove("hilite-end");
|
||||
}, 1000)
|
||||
}, 50);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue