Fix per-site permissions UI glitches when base domain is added to existing subdomain (thanks barbaz for reporting).

This commit is contained in:
hackademix 2021-01-08 23:33:12 +01:00
parent 53fedbc21d
commit 2173e3397c
1 changed files with 2 additions and 1 deletions

View File

@ -897,7 +897,7 @@ var UI = (() => {
highlight(key) {
key = Sites.toExternal(key);
for (let r of this.allSiteRows()) {
if (r.querySelector(".full-address").textContent.trim().includes(key)) {
if (r.querySelector(".full-address").textContent.trim().replace(/^.*:\/\/…/, '') === key) {
let url = r.lastElementChild;
url.style.transition = r.style.transition = "none";
r.style.backgroundColor = "#850";
@ -910,6 +910,7 @@ var UI = (() => {
url.style.transform = "none";
r.scrollIntoView();
}, 50);
break;
}
}
}