Global: Still canceling changes from past commits

This commit is contained in:
veselcraft 2022-05-09 15:14:19 +03:00
parent 7fc19ff5e7
commit 160f2c9383
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -95,8 +95,6 @@ u(".post-like-button").on("click", function(e) {
return false;
});
let picCount = 0;
function setupWallPostInputHandlers(id) {
u("#wall-post-input" + id).on("paste", function(e) {
if(e.clipboardData.files.length === 1) {
@ -106,6 +104,18 @@ function setupWallPostInputHandlers(id) {
u(input).trigger("change");
}
});
u("#wall-post-input" + id).on("input", function(e) {
var boost = 5;
var textArea = e.target;
textArea.style.height = "5px";
var newHeight = textArea.scrollHeight;
textArea.style.height = newHeight + boost + "px";
return;
// revert to original size if it is larger (possibly changed by user)
// textArea.style.height = (newHeight > originalHeight ? (newHeight + boost) : originalHeight) + "px";
});
}
u("#write > form").on("keydown", function(event) {