Skip to content

Commit

Permalink
fix(web): large description on detail-panel (immich-app#6305)
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal authored Jan 10, 2024
1 parent 12dc7c4 commit e5786b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/src/lib/components/asset-viewer/detail-panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
api.assetApi.getAssetById({ id: asset.id }).then((res) => {
people = res.data?.people || [];
textarea.value = res.data?.exifInfo?.description || '';
autoGrowHeight();
});
}
}
Expand Down Expand Up @@ -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 = () => {
Expand Down

0 comments on commit e5786b2

Please sign in to comment.