Merge pull request #681 from metamaps/better-contextMenu-fix

Better default context menu suppression fix
This commit is contained in:
Robert Best 2016-09-28 15:37:46 -04:00 committed by GitHub
commit 9605b24640
2 changed files with 6 additions and 0 deletions

View file

@ -209,6 +209,7 @@ const Create = {
bringToFront: true
})
$('.new_topic').hide()
$('#new_topic').attr('oncontextmenu','return false') //prevents the mouse up event from opening the default context menu on this element
},
name: null,
newId: 1,

View file

@ -1305,6 +1305,9 @@ const JIT = {
// create new menu for clicked on node
var rightclickmenu = document.createElement('div')
rightclickmenu.className = 'rightclickmenu'
//prevent the custom context menu from immediately opening the default context menu as well
rightclickmenu.setAttribute('oncontextmenu','return false')
// add the proper options to the menu
var menustring = '<ul>'
@ -1550,6 +1553,8 @@ const JIT = {
// create new menu for clicked on node
var rightclickmenu = document.createElement('div')
rightclickmenu.className = 'rightclickmenu'
//prevent the custom context menu from immediately opening the default context menu as well
rightclickmenu.setAttribute('oncontextmenu','return false')
// add the proper options to the menu
var menustring = '<ul>'