webui: fix copy button functionality for new branch creation
Add click handler to copy icon in commit branch containers to enable copying
branch names by clicking the icon, not just the branch name text.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: saee9afbb466904efk
diff --git a/webui/src/web-components/sketch-timeline-message.ts b/webui/src/web-components/sketch-timeline-message.ts
index 35897b4..37bd4ce 100644
--- a/webui/src/web-components/sketch-timeline-message.ts
+++ b/webui/src/web-components/sketch-timeline-message.ts
@@ -1477,7 +1477,16 @@
)}
>${commit.pushed_branch}</span
>
- <span class="copy-icon">
+ <span
+ class="copy-icon"
+ @click=${(e) => {
+ e.stopPropagation();
+ this.copyToClipboard(
+ commit.pushed_branch,
+ e,
+ );
+ }}
+ >
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"