diff --git a/src/webpage/direct.ts b/src/webpage/direct.ts index b6d0cf01..497bdc6a 100644 --- a/src/webpage/direct.ts +++ b/src/webpage/direct.ts @@ -320,6 +320,7 @@ class Direct extends Guild { const box = text.input.deref(); if (!box) return; box.value = ""; + box.placeholder = I18n.friends.requestsent(); } }, { diff --git a/src/webpage/settings.ts b/src/webpage/settings.ts index e74ddb94..07e96450 100644 --- a/src/webpage/settings.ts +++ b/src/webpage/settings.ts @@ -2107,12 +2107,14 @@ class Form implements OptionsElement { div.classList.add("suberror", "suberrora"); e.append(div); element = div; - element.focus(); + setTimeout((_) => { + element.scrollIntoView(false); + }, 100); } else { element.classList.remove("suberror"); setTimeout((_) => { element.classList.add("suberror"); - element.focus(); + element.scrollIntoView(false); }, 100); } element.textContent = message; diff --git a/translations/en.json b/translations/en.json index 73dfa05e..05bb8edc 100644 --- a/translations/en.json +++ b/translations/en.json @@ -275,6 +275,7 @@ "friends": { "addfriend": "Add friend", "addfriendpromt": "Add friends by username:", + "requestsent": "Request sent!", "all": "All", "all:": "All friends:", "blocked": "Blocked",