Skip to content

Commit

Permalink
Merge branch 'master' into dev/router-tabs-names-localization
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Jan 29, 2025
2 parents 8d3d502 + 31447f4 commit b51d85d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
![Nuget](https://img.shields.io/nuget/dt/Blazorise.svg)
[![Discord](https://img.shields.io/discord/761589226965696552?color=%237289da&label=Discord&logo=discord&logoColor=%237289da&style=flat-square)](https://discord.gg/cVmq8xBSnG)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE.md)
[![Tip Me via PayPal](https://img.shields.io/badge/PayPal-tip%20me-green.svg?logo=paypal)](https://www.paypal.me/mladenmacanovic)
[![Patreon](https://img.shields.io/badge/Patreon-donate-yellow.svg)](https://www.patreon.com/mladenmacanovic)

Blazorise is the only [Blazor](https://blazor.net/) component library offering development independent of CSS frameworks, exclusively using C#. It provides support for various frameworks including Bootstrap, Tailwind and Material.

Expand Down
15 changes: 12 additions & 3 deletions Source/Blazorise/wwwroot/memoEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,18 @@ 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;
const computedStyle = window.getComputedStyle(textarea);

const borderTop = parseFloat(computedStyle.borderTopWidth) || 0;
const borderBottom = parseFloat(computedStyle.borderBottomWidth) || 0;

textarea.style.height = 'auto';
textarea.style.overflowY = 'hidden';

const totalExtraSpace = borderTop + borderBottom;

textarea.style.height = `${textarea.scrollHeight + totalExtraSpace}px`;
}
}

Expand Down

0 comments on commit b51d85d

Please sign in to comment.