Compare commits

...

2 Commits

Author SHA1 Message Date
Zeno Rocha
3188ffbce3 Release v1.5.5 2015-11-13 01:20:15 -08:00
Zeno Rocha
5dba68634e Fixes a bug where non-editable elements were being focused 2015-11-13 01:20:02 -08:00
5 changed files with 13 additions and 8 deletions

View File

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

9
dist/clipboard.js vendored
View File

@@ -1,5 +1,5 @@
/*!
* clipboard.js v1.5.4
* clipboard.js v1.5.5
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
@@ -255,11 +255,16 @@ function select(element) {
var selectedText;
if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
element.select();
element.focus();
element.setSelectionRange(0, element.value.length);
selectedText = element.value;
}
else {
if (element.hasAttribute('contenteditable')) {
element.focus();
}
var selection = window.getSelection();
var range = document.createRange();

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "clipboard",
"version": "1.5.4",
"version": "1.5.5",
"description": "Modern copy to clipboard. No Flash. Just 2kb",
"repository": "zenorocha/clipboard.js",
"license": "MIT",
@@ -12,7 +12,7 @@
],
"dependencies": {
"good-listener": "^1.1.4",
"select": "^1.0.4",
"select": "^1.0.6",
"tiny-emitter": "^1.0.0"
},
"devDependencies": {