jmadler / emoji-picker

Add a slick emoji selector to input fields and textareas on your website.
Other
1.31k stars 318 forks source link

Emoji not working in iOS devices (iPhone, iPad) #113

Open manobse opened 6 years ago

manobse commented 6 years ago

Emoji is not applying to any iOS device. Is there any chance to fix this issue?

We have tested the same in various devices like desktop, android, windows phone and iOS devices.

It is working fine with all devices except iOS devices. Can anyone provide a solution for this issue?

Thanks!

jackfrompoland commented 6 years ago

Same problem!

Works on everything, including Safari, does not work on IOS.

ghost commented 5 years ago

I found that the demo is still working well on Iphone so I make a diff between the js in master and the one go with demo and find the following :

    EmojiPicker.prototype.discover = function() {
      // From Here
      var isiOS;
      isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
      if (isiOS) {
        return;
      }
      // To here  -> prevent us from display selector on IOS
      // From here  
      return $(this.options.emojiable_selector).emojiarea($.extend({
        emojiPopup: this,
        norealTime: true
      }, this.options));
      //To here  are same for both js 
    };

Just comment the return command in case of isIOS = true and you can make emoji working on iOS. Hope this help.

LHC087 commented 5 years ago

In emoji-picker.js EmojiPicker.prototype.discover = function() { var isiOS; isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; if (isiOS) { // annotation this ,you can run in iOS devices // return;
} return $(this.options.emojiable_selector).emojiarea($.extend({ emojiPopup: this, norealTime: true }, this.options)); };