Skip to content

Commit

Permalink
Fix AI widget copy translation (#4668)
Browse files Browse the repository at this point in the history
* Fix AI widget copy translation

* Fix lint
  • Loading branch information
thecalcc authored Oct 21, 2024
1 parent 12d3d66 commit eb9df16
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ export default class TranslationsBody extends React.Component<IProps, IState> {
ariaValue={gettext('Copy')}
icon="copy"
onClick={() => {
navigator.clipboard.writeText(translation);
const clipboardItem = new ClipboardItem(
{'text/html': new Blob([translation], {type: 'text/html'})},
);

navigator.clipboard.write([clipboardItem]);
}}
/>
{this.props.mode === 'current' && (
Expand Down

0 comments on commit eb9df16

Please sign in to comment.