Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot read property 'contains' of undefined #159

Closed
mehmet2006 opened this issue Aug 30, 2018 · 3 comments
Closed

Error: Cannot read property 'contains' of undefined #159

mehmet2006 opened this issue Aug 30, 2018 · 3 comments
Assignees

Comments

@mehmet2006
Copy link

mehmet2006 commented Aug 30, 2018

My code was working.
After the last update it started to give this error.

ERROR TypeError: Cannot read property 'contains' of undefined
at ClipboardService.push../node_modules/ngx-clipboard/fesm5/ngx-clipboard.js.ClipboardService.copyFromContent (ngx-clipboard.js:81)

I am using clipboardService and my code is like:
this.clipboardService.copyFromContent(this.selectedGalleryItem.vimeoID)

Like I said it was working before the last update

Edit:
Just checked: 11.1.3 is working, 11.1.5 throws the above error

@maxisam
Copy link
Owner

maxisam commented Aug 30, 2018

sorry about that. Please try 11.1.6

@maxisam maxisam self-assigned this Aug 30, 2018
@maxisam maxisam added the bug label Aug 30, 2018
@maxisam
Copy link
Owner

maxisam commented Aug 30, 2018

close this and track it at #158

@maxisam maxisam closed this as completed Aug 30, 2018
@maxisam maxisam added duplicate and removed bug labels Aug 30, 2018
@mehmet2006 mehmet2006 changed the title Error: Container should be a Dom element Error: Cannot read property 'contains' of undefined Aug 30, 2018
@mehmet2006
Copy link
Author

It is working. Thanks.
Great work by the way. Very easy to use...

maxisam added a commit that referenced this issue Sep 1, 2018
* fix: remove package-lock

* chore: add formating config

* chore: update setting

* fix: add container as input property.

the container is the one to append the tempary textarea. It is default to body if unset   #145

* fix: handle multiple clipboard with different container use case

* docs: update

* chore: update demo to show the usage of container for focus trapper case

* fix: unit test and add test case

* docs: update

* chore: fix travis publish

* config: change package path

* doc: add ad for other package

* chore: update version

* fix: default container as doc.body from service for direct call

* refactor: use default syntax

* style: reformat

* add unit test for calling copyFromContent directly #158, #159

* chore: version bump

* demo: update example for service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants