Skip to content

Commit

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

* Fix lint
  • Loading branch information
thecalcc authored Oct 22, 2024
1 parent 910068e commit c9ae32d
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 c9ae32d

Please sign in to comment.