jm-david / emoji-mart-vue

One component to pick them all 👊🏼
https://jm-david.github.io/emoji-mart-vue
BSD 3-Clause "New" or "Revised" License
603 stars 82 forks source link

"Not found" icon causes loading of CDN sheet #3

Closed vrizo closed 7 years ago

vrizo commented 7 years ago

Hi!

Thanks for converting of this useful plugin to Vue! It is the best emoji picker!

I'm using it in our small product — Emoji Pics Composer — and I received several messages about freezes. I tried to replicate the problem many times but with no luck. Then it was found accidentally that there is a bug with custom emoji sheet: "Nothing found" icon uses default path to CDN image, ignoring my background-image-fn, it causes giant traffic when nothing found (in my case 64.png — 11 MB). Some weak computers just can't load such image and it leads to browser freeze.

I suggest adding background-image-fn and sheet-size properties to the <emoji> component in search results.

Please review and let me know if there is any problem with it.

Thanks!

jm-david commented 7 years ago

Thanks for the fix! :) I've only reverted that last commit (adding dist to repo) so that the code can stay as close as possible to the original repo.

vrizo commented 7 years ago

Thank you! Oops, I included dist by mistake, just forgot to create a branch. Thanks!