Skip to content

Commit

Permalink
Fix for Ie8
Browse files Browse the repository at this point in the history
If there is an input box of combo box on the screen and it receives
focus before clicking on the invisible dismissal layer
(#context-menu-layer) the context menu won't disappear. I've added a IE
specific opacity filter and background color of white to
#context-menu-layer so the layer receives a click and properly
dismisses the context menu.
  • Loading branch information
metric152 committed Jan 6, 2012
1 parent f11b372 commit 89d22e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery.contextMenu.js
Expand Up @@ -1004,7 +1004,7 @@ var // currently active contextMenu trigger
},
layer: function(opt, zIndex) {
// add transparent layer for click area
return opt.$layer = $('<div id="context-menu-layer" style="position:fixed; z-index:' + zIndex + '; top:0; left:0; opacity: 0;"></div>')
return opt.$layer = $('<div id="context-menu-layer" style="position:fixed; z-index:' + zIndex + '; top:0; left:0; opacity: 0; filter: alpha(opacity=0); background-color: #000;"></div>')
.css({height: $win.height(), width: $win.width(), display: 'block'})
.data('contextMenuRoot', opt)
.insertBefore(this)
Expand Down

0 comments on commit 89d22e6

Please sign in to comment.