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

Docs: Fix clipboard code #38380

Merged
merged 1 commit into from Mar 30, 2023
Merged

Docs: Fix clipboard code #38380

merged 1 commit into from Mar 30, 2023

Conversation

patrickhlauke
Copy link
Member

@patrickhlauke patrickhlauke commented Mar 30, 2023

Description

Fix clipboard code to work with fancy code blocks.

Motivation & Context

Corrects reported bug by @julien-deramond

There's an issue to fix before releasing alpha3 (Firefox macOS, IDK about other combinations) with the current main branch regarding "Copy to clipboard" button which doesn't work anymore (e.g. https://twbs-bootstrap.netlify.app/docs/5.3/components/accordion/#example or https://twbs-bootstrap.netlify.app/docs/5.3/components/accordion/#variables).
Due to 1729bcc
Error in the console:

 Uncaught TypeError: trigger.parentNode.nextElementSibling is null
   text http://localhost:9001/docs/5.3/assets/js/docs.js:95
   value http://localhost:9001/docs/5.3/assets/js/docs.js:7
   listener http://localhost:9001/docs/5.3/assets/js/docs.js:7
   i http://localhost:9001/docs/5.3/assets/js/docs.js:7

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

@patrickhlauke patrickhlauke requested a review from a team as a code owner March 30, 2023 07:09
@patrickhlauke patrickhlauke changed the title Fix clipboard code Docs: Fix clipboard code Mar 30, 2023
@XhmikosR XhmikosR self-assigned this Mar 30, 2023
@XhmikosR XhmikosR added the docs label Mar 30, 2023
@XhmikosR XhmikosR merged commit 74c6f2b into main Mar 30, 2023
15 of 16 checks passed
@XhmikosR XhmikosR deleted the docs-fix-copy-button branch March 30, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

None yet

2 participants