Skip to content

High performance self-hosted photo and video management solution.

fix(web): large description on detail-panel (#6305)

martine5786b200ac2
diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte
index 48faadcd07..7d149e2cf6 100644
--- a/web/src/lib/components/asset-viewer/detail-panel.svelte
+++ b/web/src/lib/components/asset-viewer/detail-panel.svelte
@@ -60,6 +60,7 @@
api.assetApi.getAssetById({ id: asset.id }).then((res) => {
people = res.data?.people || [];
textarea.value = res.data?.exifInfo?.description || '';
+ autoGrowHeight();
});
}
}
@@ -112,10 +113,9 @@
showEditFaces = false;
};
- const autoGrowHeight = (e: Event) => {
- const target = e.target as HTMLTextAreaElement;
- target.style.height = 'auto';
- target.style.height = `${target.scrollHeight}px`;
+ const autoGrowHeight = () => {
+ textarea.style.height = 'auto';
+ textarea.style.height = `${textarea.scrollHeight}px`;
};
const handleFocusIn = () => {