summernote-emoji
summernote-emoji copied to clipboard
emoji-menu be closed when click on emoji
i use summernote (tam-emoji.min.js). when choosing emoji, emoji menu be close BUT i want dont close emoji-menu . search in summernote site and githubs but cant find text that help me. please help me solve this problem .
BIG THANKS
you need to make changes in the script only, use "tam-emoji.js" and edit/replace following things:
Changes in click action when clicked anywhere on body:
$body.on('mouseup', function(e) { e = e.originalEvent || e; var target = e.target || window; if ($(target).hasClass('emoji-picker') || $(target).hasClass('emoji-menu-tab') || $(target).hasClass('emoji_ico')) { return; } self.$panel.hide(); });
For identifying click on emojis in function (createdEmojiIcon) add following class in "img" tag:
return '<img src="' + blankGifPath + '" class="img emoji_ico" style="' + style + '" alt="' + Config.htmlEntities(name) + '">'; };
thanks @anshulCoder your solution works for me, but how do you keep emojis from being closed when I click scroll
Inside addListener function insert. it worked very well.
$body.on('mouseup', '.mobile_scrollable_wrap', function (e) { //Impede o fechamento do Dropdown dos emojis caso interaja com a barra de rolagem. e.stopPropagation(); e.preventDefault(); });