thomaspark / bootswatch

Themes for Bootstrap
https://bootswatch.com
MIT License
14.57k stars 3.67k forks source link

"Copy Code" Feature Not Copying Code #1243

Open benanamen opened 1 year ago

benanamen commented 1 year ago

Source: Default v5 Branch

The "Copy Code" feature in the "Source Code" window does not copy the displayed code to the Clipboard.

It works fine in any theme at bootswatch.com

Working Example: https://bootswatch.com/superhero/

  1. Hover over a element on the page and click the <> popup button
  2. "Source Code" Modal Window Opens displaying code for the element you hovered on and a "Copy Code" Button
  3. Click the "Copy Code" button and Modal Window closes.
  4. Code can now be pasted into whatever.

* Master Branch "Copy Code" works.

thomaspark commented 1 year ago

I'm not able to replicate this. Does console give you any errors when you click "Copy Code"?

benanamen commented 1 year ago

No errors show in console. What/where is the code that handles the copy to clipboard?

thomaspark commented 1 year ago

One of your extensions may be interfering.

The code is here: (https://github.com/thomaspark/bootswatch/blob/v5/docs/_assets/js/custom.js#L56-L64)