1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 15:16:44 +02:00

Remove hardcoded textarea height

This commit is contained in:
Peter Knut
2024-09-09 23:54:51 +02:00
committed by Jakub Vrana
parent 0e28daac55
commit 09720b31f1
2 changed files with 2 additions and 2 deletions

View File

@@ -306,7 +306,7 @@ function input($field, $value, $function, $autofocus = false) {
$attrs .= " cols='50' rows='12'";
} else {
$rows = min(12, substr_count($value, "\n") + 1);
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
$attrs .= " cols='30' rows='$rows'";
}
echo "<textarea$attrs>" . h($value) . '</textarea>';
} else {

View File

@@ -10,7 +10,7 @@ class AdminerEditTextarea {
function editInput($table, $field, $attrs, $value) {
if (preg_match('~char~', $field["type"])) {
return "<textarea cols='30' rows='1' style='height: 1.2em;'$attrs>" . Adminer\h($value) . '</textarea>';
return "<textarea cols='30' rows='1'$attrs>" . Adminer\h($value) . '</textarea>';
}
}
}