mirror of https://github.com/nealey/vail.git
Fix mobile long-press selecting button title
This commit is contained in:
parent
1ac866511a
commit
e60cb074f0
|
@ -13,11 +13,12 @@ export class HTML extends Input{
|
|||
|
||||
// Listen to HTML buttons
|
||||
for (let e of document.querySelectorAll("button.key")) {
|
||||
e.addEventListener("contextmenu", e => { return false }, {passive: true})
|
||||
e.addEventListener("contextmenu", e => { e.preventDefault(); return false }, {passive: false})
|
||||
e.addEventListener("touchstart", e => this.keyButton(e), {passive: true})
|
||||
e.addEventListener("touchend", e => this.keyButton(e), {passive: true})
|
||||
e.addEventListener("mousedown", e => this.keyButton(e), {passive: true})
|
||||
e.addEventListener("mouseup", e => this.keyButton(e), {passive: true})
|
||||
e.contentEditable = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
.key {
|
||||
width: 100%;
|
||||
height: 6em;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.center {
|
||||
|
|
Loading…
Reference in New Issue