diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-01-14 14:07:56 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2019-01-14 14:07:56 +0100 |
commit | 7daf18b0771abbc483edf3e85c30c5df8bc82839 (patch) | |
tree | d50561e3bf7ddb547bccd2a1ac9d3982cc0a16ed | |
parent | 65f2d7fd66103923733a93e7c476939d02b5ce28 (diff) | |
download | volse-hubzilla-7daf18b0771abbc483edf3e85c30c5df8bc82839.tar.gz volse-hubzilla-7daf18b0771abbc483edf3e85c30c5df8bc82839.tar.bz2 volse-hubzilla-7daf18b0771abbc483edf3e85c30c5df8bc82839.zip |
fix a new instance of autocomplete created on each conversation update
-rw-r--r-- | view/js/main.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js index ca9ad8ca4..017d39353 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -44,6 +44,17 @@ $(document).ready(function() { $(document).on('click', '.conversation-settings-link', getConversationSettings); $(document).on('click', '#settings_module_ajax_submit', postConversationSettings); + $(document).on('click focus', '.comment-edit-form textarea', function(e) { + if(! this.autocomplete_handled) { + /* autocomplete @nicknames */ + $(this).editor_autocomplete(baseurl+"/acl?f=&n=1"); + /* autocomplete bbcode */ + $(this).bbco_autocomplete('bbcode'); + + this.autocomplete_handled = true; + } + }); + var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);'); jQuery.timeago.settings.strings = { @@ -755,11 +766,6 @@ function updateConvItems(mode,data) { mediaPlaying = false; }); - /* autocomplete @nicknames */ - $(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); - /* autocomplete bbcode */ - $(".comment-edit-form textarea").bbco_autocomplete('bbcode'); - var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; })); var bimgcount = bimgs.length; |