From 1f3da4b8292a7c2ef7eafe9b3a00ef40eb30edac Mon Sep 17 00:00:00 2001
From: Pranav M <pranavm7@outlook.com>
Date: Mon, 18 Jul 2022 15:45:36 +0000
Subject: [PATCH] feat: edit the clipboard button to change border colour on success (#162)

---
 assets/js/popover.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/assets/js/popover.js b/assets/js/popover.js
index 494cd84..6fec7e5 100644
--- a/assets/js/popover.js
+++ b/assets/js/popover.js
@@ -46,7 +46,18 @@
               throwOnError: false
             })
           }
+
           li.addEventListener("mouseover", () => {
+            // fix tooltip positioning
+            window.FloatingUIDOM.computePosition(li, el, {
+              middleware: [window.FloatingUIDOM.offset(10), window.FloatingUIDOM.inline(), window.FloatingUIDOM.shift()],
+            }).then(({ x, y }) => {
+              Object.assign(el.style, {
+                left: `${x}px`,
+                top: `${y}px`,
+              })
+            })
+
             el.classList.add("visible")
           })
           li.addEventListener("mouseout", () => {

--
Gitblit v1.10.0