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({
title: "Posts before"
}).then((res) => {
inputEl.value.focus();
if (res.canceled) return;
inputValue.value += " before:" + res.result;
});
@ -351,7 +350,6 @@ async function openSearchFilters(ev) {
os.inputDate({
title: "Posts after"
}).then((res) => {
inputEl.value.focus();
if (res.canceled) return;
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";
showing = false;
emit("close");
if (!noReturnFocus) {
if (!props.noReturnFocus) {
focusedElement.focus();
}
}
function onBgClick() {
if (contentClicking) return;
if (!noReturnFocus) {
if (!props.noReturnFocus) {
focusedElement.focus();
}
emit("click");

View File

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