ui: missing context menu (copy, paste) in inspector inputs

This commit is contained in:
bordun 2020-11-09 12:14:02 +01:00
parent a6d4d51559
commit 268b9f9be5
3 changed files with 16 additions and 2 deletions

View file

@ -17,7 +17,9 @@ if (macOs) {
DOM.dispatchEvent(event.target, 'fast-right-click', event)
})
} else {
document.body.setAttribute('oncontextmenu', 'return false')
document.body.addEventListener('contextmenu', (event)=>{
if (event.target && (!event.target.tagName.match(/INPUT|TEXTAREA|OSC-CONSOLE|OSC-CONSOLE-MESSAGE/))) event.preventDefault()
})
}
function mouseToFastClick(event) {