This commit is contained in:
Freeplay 2023-06-10 20:30:26 -04:00
parent 5b686d161a
commit 715f7a7a1a
3 changed files with 3 additions and 5 deletions

View File

@ -338,7 +338,6 @@ async function openSearchFilters(ev) {
os.inputDate({ os.inputDate({
title: "Posts before" title: "Posts before"
}).then((res) => { }).then((res) => {
inputEl.value.focus();
if (res.canceled) return; if (res.canceled) return;
inputValue.value += " before:" + res.result; inputValue.value += " before:" + res.result;
}); });
@ -351,7 +350,6 @@ async function openSearchFilters(ev) {
os.inputDate({ os.inputDate({
title: "Posts after" title: "Posts after"
}).then((res) => { }).then((res) => {
inputEl.value.focus();
if (res.canceled) return; if (res.canceled) return;
inputValue.value += " after:" + res.result; inputValue.value += " after:" + res.result;
}); });

View File

@ -194,14 +194,14 @@ function close(ev, opts: { useSendAnimation?: boolean } = {}) {
if (props.src) props.src.style.pointerEvents = "auto"; if (props.src) props.src.style.pointerEvents = "auto";
showing = false; showing = false;
emit("close"); emit("close");
if (!noReturnFocus) { if (!props.noReturnFocus) {
focusedElement.focus(); focusedElement.focus();
} }
} }
function onBgClick() { function onBgClick() {
if (contentClicking) return; if (contentClicking) return;
if (!noReturnFocus) { if (!props.noReturnFocus) {
focusedElement.focus(); focusedElement.focus();
} }
emit("click"); emit("click");

View File

@ -492,7 +492,7 @@ export function inputDate(props: {
{ {
done: (result) => { done: (result) => {
resolve( resolve(
result (result && isFinite(new Date(result.result)))
? { result: new Date(result.result), canceled: false } ? { result: new Date(result.result), canceled: false }
: { canceled: true }, : { canceled: true },
); );