Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
Fix bug show browser context menu when use RightClickPopupMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
phuong_vu authored and trongtt committed Aug 23, 2012
1 parent 55861d4 commit 38b1918
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -37,7 +37,7 @@ eXo.webui.UIRightClickPopupMenu = {
*/
this.disableContextMenu(menu.parent());

menu.find('.UIRightPopupMenuContainer').on('click', 'div.MenuItem a', _module.UIRightClickPopupMenu.prepareObjectIdEvt)
menu.find('.UIRightPopupMenuContainer').on('click', 'div.MenuItem a', _module.UIRightClickPopupMenu.prepareObjectIdEvt);
},
/**
* Hide and disable mouse down event of context menu object
Expand Down Expand Up @@ -142,6 +142,13 @@ eXo.webui.UIRightClickPopupMenu = {
var contextMenu = document.getElementById(menuId);
contextMenu.objId = objId;

//help to disable browser context menu
//when onmouseover is registered after the dom has already displayed, mouseover evt'll not be raised
var parent = $(contextMenu).parent();
if (!document.oncontextmenu) {
parent.trigger("mouseover");
}

if(event.which != 2 && event.which !=3 && event.button !=2)
{
contextMenu.style.display = "none";
Expand Down

0 comments on commit 38b1918

Please sign in to comment.