Skip to content

Commit

Permalink
MemoEdit: add few pixels to fix clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Jan 24, 2025
1 parent b74fc76 commit 44211e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Blazorise/wwwroot/memoEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ export function updateOptions(element, elementId, options) {

function onInputChanged(e) {
if (e && e.target) {
e.target.style.height = 'auto';
e.target.style.height = this.scrollHeight + 'px';
e.target.style.overflowY = 'hidden';
const textarea = e.target;
textarea.style.height = 'auto';
textarea.style.overflowY = 'hidden';
textarea.style.height = `${textarea.scrollHeight + 2}px`; // The +2 accounts for browser rendering inaccuracies with scrollHeight
}
}

Expand Down

0 comments on commit 44211e4

Please sign in to comment.