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

cy.clipboard is not a function #16

Open
atom238 opened this issue Jul 8, 2024 · 1 comment
Open

cy.clipboard is not a function #16

atom238 opened this issue Jul 8, 2024 · 1 comment

Comments

@atom238
Copy link

atom238 commented Jul 8, 2024

Hello,
I upgraded cytoscape.js from 3.21.0 to 3.29.3 and after that I see error in browser console "TypeError: cy.clipboard is not a function at HTMLDocument.".
My code:

<script src="https://unpkg.com/cytoscape-undo-redo/cytoscape-undo-redo.js"></script>
<script src="src/extensions/clipboard/cytoscape-clipboard.js"></script>
...
var cb = cy.clipboard();
document.addEventListener("keydown", function (e) {
	if (e.ctrlKey && e.target.nodeName === 'BODY')
		if (e.which == 67)
			cy.clipboard().copy(cy.$(":selected"));
		else if (e.which == 86)
			ur.do("paste");
		else if (e.which == 65) {
	cy.elements().select();
	e.preventDefault();
	}
});
@ugurdogrusoz
Copy link
Contributor

@atom238 there hasn't been any work on this extension for a while, you might be right. we do not have any resources to work on this right now; feel free to create a PR on the unstable branch if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants