Permalink
Browse files

Fixing Issue #59 - Backdrop would not position properly in IE6

  • Loading branch information...
1 parent 18cc750 commit 518921268f7a517e12ea2d05bddcbfd224f5f8a0 @rodneyrehm rodneyrehm committed Jun 26, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/jquery.contextMenu.js
View
@@ -1116,12 +1116,22 @@ var // currently active contextMenu trigger
layer: function(opt, zIndex) {
// add transparent layer for click area
// filter and background for Internet Explorer, Issue #23
- 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>')
+ var $layer = 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)
.on('contextmenu', handle.abortevent)
.on('mousedown', handle.layerClick);
+
+ // IE6 doesn't know position:fixed;
+ if (!$.support.fixedPosition) {
+ $layer.css({
+ 'position' : 'absolute',
+ 'height' : $(document).height()
+ });
+ }
+
+ return $layer;
}
};

0 comments on commit 5189212

Please sign in to comment.