Skip to content

Commit

Permalink
Added ability to use trigger method without extra params
Browse files Browse the repository at this point in the history
  • Loading branch information
mervick committed May 17, 2016
1 parent 79d362e commit 3b8212d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions dist/emojionearea.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* EmojioneArea v3.0.2
* EmojioneArea v3.0.3
* https://github.com/mervick/emojionearea
* Copyright Andrey Izman and other contributors
* Released under the MIT license
* Date: 2016-05-17T17:09Z
* Date: 2016-05-17T17:29Z
*/
(function(document, window, $) {
'use strict';
Expand Down Expand Up @@ -772,8 +772,8 @@
return false;
})

.on("@change", function(editor) {
var html = editor.html().replace(/<\/?(?:div|span|p)[^>]*>/ig, '');
.on("@change", function() {
var html = self.editor.html().replace(/<\/?(?:div|span|p)[^>]*>/ig, '');
// clear input: chrome adds <br> when contenteditable is empty
if (!html.length || /^<br[^>]*>$/i.test(html)) {
self.editor.html(self.content = '');
Expand All @@ -785,17 +785,17 @@
app.addClass("focused");
})

.on("@blur", function(editor) {
.on("@blur", function() {
app.removeClass("focused");

if (options.hidePickerOnBlur) {
self.hidePicker();
}

var content = editor.html();
var content = self.editor.html();
if (self.content !== content) {
self.content = content;
trigger(self, 'change', [editor]);
trigger(self, 'change', [self.editor]);
source.blur().trigger("change");
} else {
source.blur();
Expand Down
4 changes: 2 additions & 2 deletions dist/emojionearea.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 3b8212d

Please sign in to comment.