Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
  • Loading branch information
OlgaLarina and OlgaLarina committed Nov 1, 2023
1 parent f384178 commit f97d78e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ function increaseHeightByContent(element: HTMLElement, getComputedStyle?: (elt:

const style = getComputedStyle(element);
element.style.height = "auto";
element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
if(!!element.scrollHeight) {
element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
}
}
function getOriginalEvent(event: any) {
return event.originalEvent || event;
Expand Down

0 comments on commit f97d78e

Please sign in to comment.