mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Fix/Prevent manual resize of params input (#4008)
This commit is contained in:
parent
277061498d
commit
ed13a351b9
1 changed files with 9 additions and 1 deletions
|
@ -14,7 +14,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
function updateHeight() {
|
||||
if (taRef) {
|
||||
taRef.style.height = "auto";
|
||||
taRef.style.height = `${taRef.scrollHeight}px`;
|
||||
// +2 for "overflow-y: auto" in case js breaks
|
||||
taRef.style.height = `${taRef.scrollHeight + 2}px`;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,3 +46,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
class="w-100"
|
||||
placeholder={render(defaults)}
|
||||
></textarea>
|
||||
|
||||
<style>
|
||||
textarea {
|
||||
resize: none;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue