mervick / emojionearea

Emoji Picker Plugin for jQuery
https://jsfiddle.net/mervick/1v03Lqnu/765/
MIT License
953 stars 257 forks source link

Capital letter issue with search #388

Open jicihome opened 4 years ago

jicihome commented 4 years ago

Possible to make the search work even with capital letters? for example Cat will return nothing. Maybe a way to toLowerCase? I tried to do it directly on the search element using jquery, but this doesn't work totally (if I search Cat, it will work at the a because it's a new keypress event, but if I set CAT this will not work even if this is converted to cat because no keypress event happen I guess).

sid04naik commented 4 years ago

Hi, I am facing the same issue. It will be good if someone can find a fix for it.

Is there any event handler for search event?

sid04naik commented 4 years ago

I found an alternative for this. used the event called "search:keypress" I am converting the capital letter to small.

search_keypress: function() { var _this = this; var small = _this.search.val().toLowerCase(); _this.search.val(small); }