diff --git a/app/views/issues/_show_issue_view_right.html.erb b/app/views/issues/_show_issue_view_right.html.erb
index b1d53eb..86942f4 100644
--- a/app/views/issues/_show_issue_view_right.html.erb
+++ b/app/views/issues/_show_issue_view_right.html.erb
@@ -6,7 +6,7 @@
-
<%= vehicle.vin.scan(/.{1,9}/)[0] if vehicle.vin %><%=vehicle.vin.scan(/.{1,9}/)[1] if vehicle.vin%>
+
<%= vehicle.vin.scan(/.{1,9}/)[0] if vehicle.vin %><%=vehicle.vin.scan(/.{1,9}/)[1] if vehicle.vin%>
<% if show_customer %>
<%= vehicle.customer %>
diff --git a/assets/javascripts/copy.js b/assets/javascripts/copy.js
index adf0bf3..3410714 100644
--- a/assets/javascripts/copy.js
+++ b/assets/javascripts/copy.js
@@ -1,12 +1,9 @@
async function handleCopy(event) {
console.log("Copy link clicked");
-
- // 1. Prevent the link from actually navigating
- event.preventDefault();
let text;
let link;
- // 2. Grab the text from our clicked link
+ // Grab the text from our clicked link
if(event.target.tagName.toLowerCase() === 'b'){
text = event.target.parentElement.innerText;
link = event.target.parentElement;
@@ -16,15 +13,15 @@ async function handleCopy(event) {
}
try {
- // 3. Write to clipboard
+ // Write to clipboard
await navigator.clipboard.writeText(text);
- // 4. Update the UI to show it worked
+ // Update the UI to show it worked
const originalText = link.innerText;
link.innerHTML = "
Copied!";
link.style.color = "#4CAF50"; // Turn green
- // 5. Reset after 2 seconds
+ // Reset after 2 seconds
setTimeout(() => {
// Check if the text is long enough to prevent errors
if (originalText.length >= 8) {