Merge pull request #3723 from thelounge/xpaw/context-position
Fix DOMRect coordinates in Safari
This commit is contained in:
commit
34436f9a72
@ -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);
|
||||
},
|
||||
|
@ -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", {
|
||||
|
Loading…
Reference in New Issue
Block a user