rm-emoji-picker
rm-emoji-picker copied to clipboard
SELECTED event never fired on iOS due to click event not being invoked on mobile devices
This is likely due to the jQuery.click event not firing events on iOS. The events fire like this:
- Click emoji #1: #1.MOUSEENTER
- Click different emoji #2: #1.MOUSELEAVE #2.MOUSEENTER
A work around in the mean time is:
var picker = new EmojiPicker(...);
picker.categories.forEach(function(cat) {
cat.emojis.forEach(function(emoji) {
emoji.$emoji.on('touchend.emoji', function() {
if(emoji._bubble){
emoji._bubble(picker.defaults.events.SELECTED, emoji);
}
});
});
});