var scroll_Height = $("-sharpcontent").get(0).scrollHeight;
$("-sharpcontent").css("height",scroll_Height + "px");
$("-sharpcontent").on("input", function() {
var scroll_Height = $("-sharpcontent").get(0).scrollHeight;
$("-sharpcontent").css("height",scroll_Height + "px");
});
<textarea name="content" id="content" class="normal_input_admin" row="1"><?=$data["content"];?></textarea>
what"s a little weird is that
when I press enter, it always increases. It all looks normal
, but when I want to go back to delete to delete text (each line)
his height only goes down 1px
suppose I press Enter three times and the height is 150px
but I want to eliminate that when these three lines become one line, his height will be like 148px. Change the true height without losing it to me
what"s the problem?