diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-01-05 17:40:45 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-01-05 17:40:45 +0100 |
commit | a1b35fb7d13c610ac6923e6162dd163312160c9a (patch) | |
tree | ca6958f8673c19901fd9ab6a08955874768b5bd7 /view/tpl/notes.tpl | |
parent | 0364bf491396c742d550fd6b0d22b929e3681432 (diff) | |
download | volse-hubzilla-a1b35fb7d13c610ac6923e6162dd163312160c9a.tar.gz volse-hubzilla-a1b35fb7d13c610ac6923e6162dd163312160c9a.tar.bz2 volse-hubzilla-a1b35fb7d13c610ac6923e6162dd163312160c9a.zip |
fix an issue with sticky_kit where input fields and textareas would blur on recalc. auto resize the notes textarea since if it sticks to the bottom it can not be properly resized
Diffstat (limited to 'view/tpl/notes.tpl')
-rw-r--r-- | view/tpl/notes.tpl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index f9fed1feb..c4da3783b 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -5,9 +5,10 @@ var noteSaveTimer = null; var noteText = $('#note-text'); - $(document).ready(function(){ - noteText.height(noteText[0].scrollHeight); - }); + noteText.on('change keyup keydown paste cut', function () { + $(this).height(0).height(this.scrollHeight); + $(document.body).trigger("sticky_kit:recalc"); + }).change(); $(document).on('focusout',"#note-text",function(e){ if(noteSaveTimer) |