emojionearea icon indicating copy to clipboard operation
emojionearea copied to clipboard

Emoji categories break after search

Open skgith1 opened this issue 6 years ago • 7 comments

After performing a text search the emoji categories break down and do not operate properly (a lot of emoji categories become missing from the picker).

Steps to reproduce:

  1. Click the emoji button to open the picker
  2. Type a search term such as "apple"
  3. Click anywhere outside the picker (the picker will close)
  4. Open the picker again to see the missing emojis

The search text box will be cleared at this point and the picker can be restored to proper operation by typing some other text and then hitting backspace until all text is deleted.

skgith1 avatar Mar 10 '18 01:03 skgith1

Also, I have noticed a similar issue occurs when highlighting the text you type in the search box and pressing delete.

skgith1 avatar Mar 19 '18 02:03 skgith1

Similar issue to this is the anchors break too, seems to always happen if you search for something, click an anchor.. If you then remove all text and try click any anchor, it will not scroll to the right sections. And randomly happens after searching even if not clicking any of the anchors.

johnsenpeder avatar Dec 20 '18 12:12 johnsenpeder

Same issue, searching and closing the picker breaks the categories completely

maxencehenneron avatar Jan 29 '19 07:01 maxencehenneron

This might not be the "correct" fix as far as how the plugin is meant to work, but I got it working by changing https://github.com/mervick/emojionearea/blob/99129f789f2e7619ce553c038783a13f47cbc846/dist/emojionearea.js#L1357 to:

categoryBlocks.filter('[data-tone="' + tones.find("i.active").data("skin") + '"]:not([name="recent"])').children().show();

HanPrower avatar Feb 14 '19 18:02 HanPrower

Has this bug been fixed?

jerryliu1997 avatar Apr 08 '19 04:04 jerryliu1997

@HanFox could you submit a pull request? The bug still exists but I believe your fix is correct

carpii avatar Apr 14 '19 19:04 carpii

@mervick, why do you thumb-down my reply? You don't think it's the correct solution?

carpii avatar Apr 19 '19 23:04 carpii