code editor: fix context menu
This commit is contained in:
parent
14604b9d5a
commit
dfdce7d12c
1 changed files with 5 additions and 1 deletions
|
|
@ -18,7 +18,11 @@ if (macOs) {
|
|||
})
|
||||
} else {
|
||||
document.body.addEventListener('contextmenu', (event)=>{
|
||||
if (event.target && (!event.target.tagName.match(/INPUT|TEXTAREA|OSC-CONSOLE|OSC-CONSOLE-MESSAGE/))) event.preventDefault()
|
||||
if (
|
||||
event.target &&
|
||||
!event.target.classList.contains('ace_content') &&
|
||||
!event.target.tagName.match(/INPUT|TEXTAREA|OSC-CONSOLE|OSC-CONSOLE-MESSAGE/)
|
||||
) event.preventDefault()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue