From ff4c7e16f0e85759c6a511511bc9f2b58a4e70ea Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Fri, 30 Jun 2017 15:53:12 -0300 Subject: [PATCH] Fixes problem reported on #431 --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 555ee12..fe4d056 100644 --- a/index.html +++ b/index.html @@ -172,7 +172,7 @@ clipboard.on('error', function(e) {

For use in Bootstrap Modals or with any other library that changes the focus you'll want to set the focused element as the container value.

new Clipboard('.btn', {
-    container: document.getElementById('#modal')
+    container: document.getElementById('modal')
 });

Also, if you are working with single page apps, you may want to manage the lifecycle of the DOM more precisely. Here's how you clean up the events and objects that we create.