Beto Muniz
21db7250ed
Support more HTML input types. Close #800 ( #808 )
...
* Support more HTML input types.
* Improve test description. Remove .only
* Apply logic only when target is an input element
2022-05-04 14:47:44 -03:00
Patrick H. Lauke
08169bce8c
Fix #805 don't `blur()` the trigger after a clipboard action ( #807 )
...
* Remove the `blur()` following a clipboard action
It's pointless to set `focus()` on the trigger first, if in the next step you're just going to `blur()` the active element anyway.
* Tweak test to not expect active element to be body
Since it's now not `blur()`ing anymore
* Fix test
see https://github.com/zenorocha/clipboard.js/pull/807#discussion_r862080076
2022-05-04 14:45:44 -03:00
Shabai Liu
9b0c87b184
Fix type for copy function ( #795 )
...
Co-authored-by: Shabai Liu <shabai_liu@apple.com>
2022-04-28 17:15:48 -03:00
Beto Muniz
7d675f5fc1
Fix Event API. Update demos. Update tests ( #793 )
2022-02-02 12:13:00 -03:00
Beto Muniz
44df750c9f
Isolate actions strategies in order to code improvement and programmatic usage. ( #749 )
...
* Isolate cut, copy and core helper functions.
* Update tests to accommodate new proposal
* Add/update tests
* Add tests to static copy/cut methods
* Update condition syntax based on PR reviews
* Migrate clipboard-action-default to functional approach. Update tests. Add tests
* Improve folder structure. Clean up code.
* Add types. Fix tsd check env. Improve in-code doc comments
* Improve in-code doc comments
2021-05-18 11:46:22 -03:00
vitormalencar
2d5e3d2317
updating type definitons
2021-03-07 14:15:36 +01:00
vitormalencar
c23b30d052
feat : add blank line between class members
2021-02-25 16:29:36 +01:00
vitormalencar
4ab89f3d98
feat: merge with master
2021-02-25 16:25:24 +01:00
vitormalencar
7b7ce32b65
Merge branch 'master' of github.com:zenorocha/clipboard.js into feature-732-removing-dom-el
...
* 'master' of github.com:zenorocha/clipboard.js:
refactor(workflows): remove unused lint file
feat(workflows): add lint code job
chore(eslint): add comments and new rules
chore(deps): remove sort-package-json
refactor: remove eslint ignore rules comments
ci(lint): create a ci workflow
chore(clipboard): remove linter bugs
chore(deps): add dependencies and new scripts
chore(test): remove linter bugs
chore(linter): add linter configuration
feat(eslint): add linter configuration
chore(deps): add linter
updating naming
adding deploy action
2021-02-25 16:21:53 +01:00
vitormalencar
b66010bf77
feat: decoupling create fakeElemet logic
2021-02-25 16:16:12 +01:00
vitormalencar
dc2b5bf0ea
removing element after selection
2021-02-24 22:47:49 +01:00
r3nanp
cb1fec4c6a
refactor: remove eslint ignore rules comments
2021-02-16 19:01:13 -03:00
r3nanp
b21b99fe5f
chore(clipboard): remove linter bugs
2021-02-13 10:56:07 -03:00
vitormalencar
b460d6864c
update type for emitter
2021-01-24 16:53:30 +01:00
vitormalencar
9870b14e80
Add initial type definitions
2021-01-22 15:59:50 +01:00
vitormalencar
971834388c
update code style
2021-01-21 11:45:33 +01:00
vitormalencar
2660565b61
update code style
2021-01-20 16:55:03 +01:00
Zeno Rocha
e430d056ad
Fix "isSupported" behavior - Closes #666
2020-03-04 22:24:24 -08:00
LeuisKen
5de8be447f
fix: change export from commonjs to es module for import from src usage.
2020-03-03 18:09:24 -08:00
ossdev
83824fa248
ClipboardJS: Removed PhantomJS Dependency
...
Added karma-chrome-launcher dependency
Signed-off-by: ossdev <ossdev@puresoftware.com>
2020-02-29 09:53:41 -08:00
Patrick H. Lauke
a55c9ac513
Move focus to trigger instead of simply blur()ing ( #419 )
...
blur() results in a loss/reset of keyboard focus, meaning keyboard users usually get thrown right back to the start of the page. Instead, this moves focus back to the trigger (which had the focus when the trigger was activated).
As with the proposed fix in https://github.com/zenorocha/clipboard.js/pull/418 this obviously results in the focus styles (like the default outline, unless suppressed) being applied to the trigger (see the related PR for rationale and future fix using `:focus-ring`)
2017-05-29 16:54:55 -07:00
Peder Johnsen
f42b57067d
Container option ( #368 )
...
* Allow container option to fix bugs related to bootstrap modals etc.
* Updated readme to reflect addition of container option
* Name link
* Removed test log
* Remove unwanted whitespace
* Refactored description
2017-05-29 14:17:26 -07:00
Gabriel Kalani
5ab50475e0
ES6 refactor ( #409 )
...
* little fix
* little fix /2
* test/clipboard.js refactored
* emitter: emitter --> emitter
* Examples in ES6
* es6
* back to original code
* script > npm test
* script > npm test not necessary
* updating modules
* removing export default
2017-05-02 21:34:18 -07:00
Zeno Rocha
3696739e5e
Prevents scroll jump on iOS when using "data-clipboard-text"
...
Thanks to @geraldarthur at #369
2017-02-07 23:37:43 -08:00
Itai Steinherz
63d1b0f014
Add isSupported method #355
2017-02-07 23:36:29 -08:00
Zeno Rocha
fce625f151
Fixes #320
2016-10-16 18:53:34 -07:00
JY Kim
76b907949c
issue #282 solution ( #283 )
...
* add selectedText
* better code
* remove dist folder
* Revert "remove dist folder"
This reverts commit 50e726c7a7
.
* orogin dist source
2016-09-08 08:57:41 -07:00
Alexander
869c4e3219
Fix bug that unable to remove fake event listener ( #256 )
...
* Fix bug that unable to remove fake event listener
* Update dist
2016-06-09 07:54:07 -07:00
Zeno Rocha
294e9fcb5d
Fix fake element position from "fixed" to "absolute" #194 #250
2016-06-08 21:44:54 -07:00
grabus
c3fefc1fc0
Fix memory leak because of fakeHandlers ( #243 )
...
addEventListener always returns undefined by spec
https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget-addEventListener
2016-05-26 11:35:18 -07:00
Zeno Rocha
7a5a910bcd
Removes error message when target/text attributes are null, undefined, or false
2016-04-03 22:16:22 -07:00
Sebastian Ekström
941bdbb16e
Use const instead of let when applicable
2016-04-01 13:17:12 +02:00
Zeno Rocha
07a1f8456b
Throws error when disabled or readonly attributes are used on target element
...
Fixes #41
2016-03-01 15:38:25 -08:00
Zeno Rocha
d346f30e5d
Merge pull request #190 from heldr/master
...
update modules and fix #176
2016-02-25 12:19:22 -08:00
Stepan Mikhaylyuk
43d9c11aaf
minor fix for fake elem
...
after call clipboard all page scrolls down. As i understand, its relates to fake element, cause its append to body.
I just set position to 'fixed' and now it works right. I think 'fixed' is more css-style independence then 'absolute'
2016-02-25 15:20:13 +03:00
Helder Santana
90a52149ed
fix babel 6 export default behaviour
2016-02-20 01:41:40 -05:00
Zeno Rocha
bc9bcdd678
Adds explanations on textarea styling #143 #179 #180
2016-02-04 11:25:00 -08:00
Zeno Rocha
4c9e29a0dc
Resets invisible textarea's paddings and margins #179
2016-02-04 11:09:10 -08:00
speedplane
bd6dc9eb9f
Prevent auto-zooming on an iphone by making the text area size appropriate size. Fixes Issue 180.
2016-02-04 11:12:04 -05:00
RAFIE Younes
31e3622e17
Fixed RTL issue #161
2016-02-02 13:27:11 -08:00
Oskar Cieslik (rpawfuiml)
2aa163b1d0
Small ES2015 changes ;).
2015-11-13 22:01:59 +01:00
Zeno Rocha
cb4301658c
Updates delegate package which now exposes e.delegateTarget property #120
2015-11-13 00:24:46 -08:00
Paul Felice
37136663df
use event's currentTarget instead of target
2015-11-06 15:49:21 +01:00
Zeno Rocha
6b1f6b22a6
Allows HTML elements to be passed in the constructor - Fixes #25
2015-10-26 01:06:29 -07:00
Zeno Rocha
70b2548a80
Migrates to delegate fork
2015-10-20 12:35:25 -07:00
Zeno Rocha
c6dc01cc29
Moves selection code to a different package
2015-10-19 16:21:38 -07:00
Zeno Rocha
9377659c9c
Fixes discontiguous selection #17
2015-10-13 09:28:11 -07:00
Whit Jackson
6ca2ba514c
replace 'an user' with 'a user'
2015-10-09 17:17:37 -07:00
Calvin Correli
c5b416b108
Fix for scrolling to top in unsupported firefox
...
My previous fix didn't actually work. Instead of scrolling to the bottom it would scroll to the top, because it turns out document.body.scrollTop always returns 0 in Firefox.
This should work in most browsers.
See here: http://help.dottoro.com/ljnvjiow.php
2015-10-05 11:54:20 -04:00
Zeno Rocha
8dc4e2e132
Adds destroy method for ClipboardAction too #24
2015-10-03 19:05:12 -07:00