Closed RafaelPlantard closed 6 years ago
I'm also facing the same issue? Does someone looking into it?
I got the same problem too, but I can log out which key is pressed. My problem is that I can't submit the form on enter (e.which == 13).
ThPadelis Managed to solve?
@Fabiombrs still can't figure out what's wrong...
@ThPadelis Did you test someone else? would have some to indicate? thankful !
Hi, maybe this helps someone (it's solved my problem): from line 379 in emojiarea.js:
this.$editor.on("change keydown keyup resize scroll", function(e) {
// ADD THESE LINES TO TRIGGER ENTER KEY ON ORIGINAL INPUT
if (e.keyCode == 13 && e.type == 'keyup') {
var ev = jQuery.Event("keyup");
ev.which = 13;
ev.keyCode = 13;
$textarea.trigger(ev);
// IT'S NEEDED IN MY CHAT APP TO CLEAR CONTENTEDITABLE DIV AFTER SENDING THE MESSAGE
editorDiv.html('');
}
if(MAX_LENGTH_ALLOWED_KEYS.indexOf(e.which) == -1 &&
!((e.ctrlKey || e.metaKey) && e.which == 65) && // Ctrl + A
!((e.ctrlKey || e.metaKey) && e.which == 67) && // Ctrl + C
editorDiv.text().length + editorDiv.find('img').length >= editorDiv.attr('maxlength'))
{
e.preventDefault();
}
self.updateBodyPadding(editorDiv);
});
Hope this helps. :)
HI hi, this didnt work. I tried to use this and placed in jquery.emojiarea.js but no luck :(
After using data-emojiable="true" all keydown binding data stop to working. When I type the key 'enter', the messages must be submitted. However, after using emoji-picker, it doesn't work properly, Thanks in advance. Please help me.
Here is trhe solution. Use norealTime parameter (set to false) :
Like this :
new EmojiPicker({
emojiable_selector: ".hasEmojiPicker.picker_" + translatekey_field,
assetsPath: "/js/plugins/emoji-picker/img/",
popupButtonClasses: "fa fa-smile-o input-group-btn btn btn-default",
norealTime: false
});`
After using
data-emoji-input="unicode" data-emojiable="true"
allkeyup
binding data stop to working. Just working withchange
event.