Compare commits

..

5 Commits

Author SHA1 Message Date
Zeno Rocha
54efeb68e6 Release v1.4.2 2015-10-13 11:12:56 -07:00
Nik Butenko
f56825bf73 Add .npmignore 2015-10-13 09:45:51 -07:00
Zeno Rocha
9377659c9c Fixes discontiguous selection #17 2015-10-13 09:28:11 -07:00
Zeno Rocha
5e43e84d91 Merge pull request #86 from whitj00/patch-1
replace 'an user' with 'a user'
2015-10-10 08:59:47 -07:00
Whit Jackson
6ca2ba514c replace 'an user' with 'a user' 2015-10-09 17:17:37 -07:00
7 changed files with 24 additions and 5 deletions

View File

@@ -17,3 +17,6 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[{package.json,bower.json}]
indent_size = 2

6
.npmignore Normal file
View File

@@ -0,0 +1,6 @@
/.*/
/example/
/test/
/.*
/bower.json
/karma.conf.js

View File

@@ -1,9 +1,17 @@
{
"name": "clipboard",
"version": "1.4.1",
"version": "1.4.2",
"description": "Modern copy to clipboard. No Flash. Just 2kb",
"license": "MIT",
"main": "dist/clipboard.js",
"ignore": [
"/.*/",
"/example/",
"/test/",
"/.*",
"/bower.json",
"/karma.conf.js"
],
"keywords": [
"clipboard",
"copy",

3
dist/clipboard.js vendored
View File

@@ -294,7 +294,7 @@ var ClipboardAction = (function () {
/**
* Only removes the fake element after another click event, that way
* an user can hit `Ctrl+C` to copy because selection still exists.
* a user can hit `Ctrl+C` to copy because selection still exists.
*/
ClipboardAction.prototype.removeFake = function removeFake() {
@@ -321,6 +321,7 @@ var ClipboardAction = (function () {
var range = document.createRange();
var selection = window.getSelection();
selection.removeAllRanges();
range.selectNodeContents(this.target);
selection.addRange(range);
this.selectedText = selection.toString();

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -69,7 +69,7 @@ class ClipboardAction {
/**
* Only removes the fake element after another click event, that way
* an user can hit `Ctrl+C` to copy because selection still exists.
* a user can hit `Ctrl+C` to copy because selection still exists.
*/
removeFake() {
if (this.fakeHandler) {
@@ -95,6 +95,7 @@ class ClipboardAction {
let range = document.createRange();
let selection = window.getSelection();
selection.removeAllRanges();
range.selectNodeContents(this.target);
selection.addRange(range);
this.selectedText = selection.toString();