Skip to content

Commit

Permalink
Fixes copy code not working for modal due to no focus, #PG-3520 (#22366)
Browse files Browse the repository at this point in the history
  • Loading branch information
AltamashShaikh committed Jul 3, 2024
1 parent e130c1e commit f8d82ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugins/CoreHome/vue/dist/CoreHome.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/CoreHome/vue/dist/CoreHome.umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function onClickHandler(pre: HTMLElement) {
textarea.style.left = '-9999px';
document.body.appendChild(textarea);
textarea.select();
textarea.focus();
document.execCommand('copy');
document.body.removeChild(textarea);
const btn = (pre.parentElement as HTMLButtonElement);
Expand Down

0 comments on commit f8d82ef

Please sign in to comment.