Skip to content

Commit

Permalink
Fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
mervick committed Jan 18, 2018
1 parent d263315 commit a0d2a8d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions dist/emojionearea.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* EmojioneArea v3.3.0
* EmojioneArea v3.3.1
* https://github.com/mervick/emojionearea
* Copyright Andrey Izman and other contributors
* Released under the MIT license
* Date: 2018-01-17T23:35Z
* Date: 2018-01-18T00:05Z
*/
window = ( typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {} );
document = window.document || {};
Expand Down Expand Up @@ -967,7 +967,8 @@ document = window.document || {};

if (skin === 0) {
category = div('category').attr({
name: filter
name: filter,
"data-tone": skin
}).appendTo(mainBlock);
} else {
category = div('category-block').attr({
Expand Down Expand Up @@ -1307,14 +1308,13 @@ document = window.document || {};
}
}

var $category = $(this);
matchEmojis($category, activeTone);

// If tone 0 category, show/hide matches for tone 0 no matter the active tone
if ($category.data('tone') === 0) {
$category.children(selector("category") + ':not([name="recent"])').each(function() {
var $block = $(this);
if ($block.data('tone') === 0) {
categories.filter(':not([name="recent"])').each(function() {
matchEmojis($(this), 0);
})
} else {
matchEmojis($block, activeTone);
}
});
if (!noListenScroll) {
Expand Down
4 changes: 2 additions & 2 deletions dist/emojionearea.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emojionearea",
"version": "3.3.0",
"version": "3.3.1",
"description": "WYSIWYG-like EmojiOne Converter / Picker Plugin for jQuery",
"main": "dist/emojionearea.js",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions src/function/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ function($, emojione, blankImg, slice, css_class, emojioneSupportMode, invisible

if (skin === 0) {
category = div('category').attr({
name: filter
name: filter,
"data-tone": skin
}).appendTo(mainBlock);
} else {
category = div('category-block').attr({
Expand Down Expand Up @@ -478,14 +479,13 @@ function($, emojione, blankImg, slice, css_class, emojioneSupportMode, invisible
}
}

var $category = $(this);
matchEmojis($category, activeTone);

// If tone 0 category, show/hide matches for tone 0 no matter the active tone
if ($category.data('tone') === 0) {
$category.children(selector("category") + ':not([name="recent"])').each(function() {
var $block = $(this);
if ($block.data('tone') === 0) {
categories.filter(':not([name="recent"])').each(function() {
matchEmojis($(this), 0);
})
} else {
matchEmojis($block, activeTone);
}
});
if (!noListenScroll) {
Expand Down

0 comments on commit a0d2a8d

Please sign in to comment.