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) { highlight(key) {
key = Sites.toExternal(key); key = Sites.toExternal(key);
for (let r of this.allSiteRows()) { 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; let url = r.lastElementChild;
url.style.transition = r.style.transition = "none"; url.style.transition = r.style.transition = "none";
r.style.backgroundColor = "#850"; r.style.backgroundColor = "#850";
@ -910,6 +910,7 @@ var UI = (() => {
url.style.transform = "none"; url.style.transform = "none";
r.scrollIntoView(); r.scrollIntoView();
}, 50); }, 50);
break;
} }
} }
} }