Release v1.5.4

This commit is contained in:
Zeno Rocha
2015-11-13 00:25:35 -08:00
parent cb4301658c
commit a12a056ef6
5 changed files with 14 additions and 16 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "clipboard", "name": "clipboard",
"version": "1.5.3", "version": "1.5.4",
"description": "Modern copy to clipboard. No Flash. Just 2kb", "description": "Modern copy to clipboard. No Flash. Just 2kb",
"license": "MIT", "license": "MIT",
"main": "dist/clipboard.js", "main": "dist/clipboard.js",

20
dist/clipboard.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* clipboard.js v1.5.3 * clipboard.js v1.5.4
* https://zenorocha.github.io/clipboard.js * https://zenorocha.github.io/clipboard.js
* *
* Licensed MIT © Zeno Rocha * Licensed MIT © Zeno Rocha
@ -92,13 +92,9 @@ function delegate(element, selector, type, callback) {
*/ */
function listener(element, selector, type, callback) { function listener(element, selector, type, callback) {
return function(e) { return function(e) {
var delegateTarget = closest(e.target, selector, true); e.delegateTarget = closest(e.target, selector, true);
if (delegateTarget) {
Object.defineProperty(e, 'target', {
value: delegateTarget
});
if (e.delegateTarget) {
callback.call(element, e); callback.call(element, e);
} }
} }
@ -665,15 +661,17 @@ var Clipboard = (function (_Emitter) {
*/ */
Clipboard.prototype.onClick = function onClick(e) { Clipboard.prototype.onClick = function onClick(e) {
var trigger = e.delegateTarget || e.currentTarget;
if (this.clipboardAction) { if (this.clipboardAction) {
this.clipboardAction = null; this.clipboardAction = null;
} }
this.clipboardAction = new _clipboardAction2['default']({ this.clipboardAction = new _clipboardAction2['default']({
action: this.action(e.target), action: this.action(trigger),
target: this.target(e.target), target: this.target(trigger),
text: this.text(e.target), text: this.text(trigger),
trigger: e.target, trigger: trigger,
emitter: this emitter: this
}); });
}; };

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
Package.describe({ Package.describe({
name: "zenorocha:clipboard", name: "zenorocha:clipboard",
summary: "Modern copy to clipboard. No Flash. Just 2kb.", summary: "Modern copy to clipboard. No Flash. Just 2kb.",
version: "1.5.3", version: "1.5.4",
git: "https://github.com/zenorocha/clipboard.js" git: "https://github.com/zenorocha/clipboard.js"
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "clipboard", "name": "clipboard",
"version": "1.5.3", "version": "1.5.4",
"description": "Modern copy to clipboard. No Flash. Just 2kb", "description": "Modern copy to clipboard. No Flash. Just 2kb",
"repository": "zenorocha/clipboard.js", "repository": "zenorocha/clipboard.js",
"license": "MIT", "license": "MIT",