Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix: fixed an issue that would half the textarea in grid layout after submitting a bookmark (#269)

kamtschatkabf92fa3386be
diff --git a/apps/web/components/dashboard/bookmarks/EditorCard.tsx b/apps/web/components/dashboard/bookmarks/EditorCard.tsx
index 78bd0742..605fcf42 100644
--- a/apps/web/components/dashboard/bookmarks/EditorCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/EditorCard.tsx
@@ -33,6 +33,7 @@ function useFocusOnKeyPress(inputRef: React.RefObject<HTMLTextAreaElement>) {
inputRef.current.focus();
}
}
+
document.addEventListener("keydown", handleKeyPress);
return () => {
document.removeEventListener("keydown", handleKeyPress);
@@ -75,7 +76,8 @@ export default function EditorCard({ className }: { className?: string }) {
});
}
form.reset();
- if (inputRef?.current?.style) {
+ // if the list layout is used, we reset the size of the editor card to the original size after submitting
+ if (bookmarkLayout === "list" && inputRef?.current?.style) {
inputRef.current.style.height = "auto";
}
},