From 10cba8d9b0647b1d2e81793ef7b79b8ff55f397b Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Fri, 24 Jan 2020 16:55:29 +0200 Subject: [PATCH] Fix DOMRect coordinates in Safari --- client/components/ChatUserList.vue | 4 ++-- client/js/vue.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/ChatUserList.vue b/client/components/ChatUserList.vue index 3dea252c..bfdde826 100644 --- a/client/components/ChatUserList.vue +++ b/client/components/ChatUserList.vue @@ -137,8 +137,8 @@ export default { view: window, bubbles: true, cancelable: true, - clientX: rect.x, - clientY: rect.y + rect.height, + clientX: rect.left, + clientY: rect.top + rect.height, }); el.dispatchEvent(ev); }, diff --git a/client/js/vue.js b/client/js/vue.js index 91f10665..e5140bc5 100644 --- a/client/js/vue.js +++ b/client/js/vue.js @@ -35,8 +35,8 @@ const vueApp = new Vue({ const rect = el.getBoundingClientRect(); const event = new MouseEvent("click", { view: window, - clientX: rect.x + 10, - clientY: rect.y, + clientX: rect.left + 10, + clientY: rect.top, }); this.$root.$emit("contextmenu:removenetwork", {