Skip to content

Instantly share code, notes, and snippets.

@slattery
Last active June 11, 2024 18:24
Show Gist options
  • Save slattery/d0c12a7be577852e3e94173afe6f0a12 to your computer and use it in GitHub Desktop.
Save slattery/d0c12a7be577852e3e94173afe6f0a12 to your computer and use it in GitHub Desktop.
clipboardjs-tooltip-collision.patch
diff --git a/js/clipboard.js b/js/clipboard.js
index 05513e94c9a5c5207518d93ffd307f2045a43572..608a66bf18d5365f56cfb9f6f313f0640ca7eaf4 100644
--- a/js/clipboard.js
+++ b/js/clipboard.js
@@ -34,7 +34,7 @@ window.ClipboardJS = window.ClipboardJS || Clipboard;
}
// Display as tooltip.
else if (alertStyle === 'tooltip') {
- let $tooltip = $('.tooltip', e.trigger);
+ let $tooltip = $('.clipboardjs-tooltip', e.trigger);
// Show custom tooltip.
$('.tooltiptext', $tooltip).text(alertText);
@@ -63,7 +63,7 @@ window.ClipboardJS = window.ClipboardJS || Clipboard;
}
}
- let $tooltip = $('.tooltip', e.trigger);
+ let $tooltip = $('.clipboardjs-tooltip', e.trigger);
// Show custom tooltip.
$('.tooltiptext', $tooltip).text(actionMsg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment