-
Notifications
You must be signed in to change notification settings - Fork 9k
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
BUG: "Copy" button not working #9094
Comments
@damian-polewski-sb Can you please verify if your commit is the issue here? |
Found a fix. Replace this: swagger-ui/src/core/components/copy-to-clipboard-btn.jsx Lines 17 to 21 in 4b0e8a8
with: <CopyToClipboard text={this.props.textToCopy}>
<div className="view-line-link copy-to-clipboard" title="Copy to clipboard">
<CopyIcon />
</div>
</CopyToClipboard> |
Hi @Teraskull, As you suggested, wrapping the whole div in CopyToClipboard solves this issue. I will be raising a PR to apply those changes. Thanks for your help! |
These arbitrary props will allow to handle native React element events among other things. Refs #9094
Hi everybody, Thank you for reporting this issue and providing a possible remediation. I've issued #9106 which superseded #9097. This issue suggests a solution (which works), but underlying systemic issue wouldn't been addressed. The solution proposed in this issue lacks explanation so we're not sure why it works. If we dig deeper we find out that our new |
Hi @char0n! First of all, nice job! I agree this approach will be much more elegant and will get rid of any further issues with arbitrary props that might come up. |
These arbitrary props will allow to handle native React element events among other things. Refs #9094
Addressed in #9106 |
The "Copy" button does not work anymore since commit f3ea2a2
Verified by running SwaggerUI on the previous commit: be9f944
The "Copy" button works as intended here.
The text was updated successfully, but these errors were encountered: