fixed position for context menu (safari), removed fileselection on longpress
This commit is contained in:
parent
b84fc03c91
commit
be12d53c0e
@ -450,8 +450,8 @@
|
||||
e?.preventDefault();
|
||||
console.log(e);
|
||||
this.contextMenu.shown = true;
|
||||
this.contextMenu.x = undefined || e?.x || 0;
|
||||
this.contextMenu.y = e?.clientY || e?.y || 0;
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2;
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2;
|
||||
this.contextMenu.item = item;
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
|
@ -549,8 +549,8 @@
|
||||
if (!this.contextMenu.shown) {
|
||||
e?.preventDefault();
|
||||
this.contextMenu.shown = true
|
||||
this.contextMenu.x = e?.clientX || e?.x || 0
|
||||
this.contextMenu.y = e?.clientY || e?.y || 0
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2;
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2;
|
||||
this.contextMenu.item = item
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
|
@ -35,7 +35,12 @@ Vue.directive('longpress', {
|
||||
if (pressTimer === null) {
|
||||
pressTimer = setTimeout(() => {
|
||||
// Run function
|
||||
const before = el.style.userSelect;
|
||||
el.style.userSelect = 'none';
|
||||
handler(e)
|
||||
setTimeout(() => {
|
||||
el.style.userSelect = before;
|
||||
}, 100);
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user