NodeBB-Community / nodebb-plugin-emoji-extended

Adds extended functionality of Emoji into NodeBB
MIT License
4 stars 1 forks source link

accepting an autocomplete does not update the composer's preview #2

Closed BenLubar closed 8 years ago

BenLubar commented 8 years ago

Demonstration: https://www.youtube.com/watch?v=wkZggOpw0bo

julianlam commented 8 years ago

You know... I've noticed this for quite awhile but it never really occurred to me to fix it, since it's only a minor issue. I suppose if you see it enough times you stop noticing it :laughing:

julianlam commented 8 years ago

To fix, either call .trigger('input') on the textarea, or require(['composer/preview']) and call .render(), passing in the textarea element

ghost commented 8 years ago

I've merged and fixed (the variable $textarea actually was no jQuery object o_O).

However, this just regards clicks within the modal.

For the original demonstration (trigger update after autocompletion) I think this belongs into the core (for chats, into the default composer for posts) @julianlam . EDIT: xD there is no preview within chats, so nvm on that part ;) According to this line you could watch for either of those events in addition to "input".

ghost commented 8 years ago

Moved to https://github.com/NodeBB/nodebb-plugin-composer-default/issues/27