mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Release v1.5.4
This commit is contained in:
@ -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
20
dist/clipboard.js
vendored
@ -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
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
4
dist/clipboard.min.js
vendored
4
dist/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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",
|
||||||
|
Reference in New Issue
Block a user