You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The button 'copy' snippet doesn't work if storybook is deployed without HTTPs.
It's related to #10526 : navigator.clipboard requires a secure origin.
To Reproduce
Launch a storybook on a non-secure origin (ie, no https and no localhost)
Go to a story snippet and click on the copy button
It fails with the following exception on next and 6.1
Uncaught TypeError: Cannot read property 'writeText' of undefined
at onClick (syntaxhighlighter.js:204)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:306)
at executeDispatch (react-dom.development.js:389)
at executeDispatchesInOrder (react-dom.development.js:414)
at executeDispatchesAndRelease (react-dom.development.js:3278)
at executeDispatchesAndReleaseTopLevel (react-dom.development.js:3287)
at forEachAccumulated (react-dom.development.js:3259)
Describe the bug
The button 'copy' snippet doesn't work if storybook is deployed without HTTPs.
It's related to #10526 : navigator.clipboard requires a secure origin.
To Reproduce
System
nvironment Info:
System:
OS: macOS 11.1
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Binaries:
Node: 15.6.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.4.0 - /usr/local/bin/npm
Browsers:
Chrome: 88.0.4324.96
Safari: 14.0.2
The text was updated successfully, but these errors were encountered: