rm-emoji-picker icon indicating copy to clipboard operation
rm-emoji-picker copied to clipboard

SELECTED event never fired on iOS due to click event not being invoked on mobile devices

Open jakenorthey opened this issue 6 years ago • 0 comments

This is likely due to the jQuery.click event not firing events on iOS. The events fire like this:

  1. Click emoji #1: #1.MOUSEENTER
  2. 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);
          }
        });
      });
    });

jakenorthey avatar Sep 04 '18 18:09 jakenorthey