mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-19 09:56:05 +08:00
Fix content clipcopy
This commit is contained in:
parent
6b139c95ce
commit
1e7b111c64
1 changed files with 2 additions and 4 deletions
|
@ -49,12 +49,10 @@ export function registerGlobalEventHandlers() {
|
|||
|
||||
window.addEventListener("lb:clipcopy", (event) => {
|
||||
if ("clipboard" in navigator) {
|
||||
const tag = event.target.tagName;
|
||||
|
||||
if (tag === "INPUT") {
|
||||
if (event.target.tagName === "INPUT") {
|
||||
navigator.clipboard.writeText(event.target.value);
|
||||
} else {
|
||||
navigator.clipboard.writeText(event.target.tagName);
|
||||
navigator.clipboard.writeText(event.target.textContent);
|
||||
}
|
||||
} else {
|
||||
alert(
|
||||
|
|
Loading…
Add table
Reference in a new issue