mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Global: Still canceling changes from past commits
This commit is contained in:
parent
7fc19ff5e7
commit
160f2c9383
1 changed files with 12 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue