Skip to content

Commit

Permalink
Fixing Issue #49 - using body as a selector breaks z-index detection
Browse files Browse the repository at this point in the history
  • Loading branch information
rodneyrehm committed May 29, 2012
1 parent f20d600 commit 0a7e457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery.contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ var // currently active contextMenu trigger
while (true) {
zin = Math.max(zin, parseInt($tt.css('z-index'), 10) || 0);
$tt = $tt.parent();
if (!$tt || !$tt.length || $tt.prop('nodeName').toLowerCase() == 'body') {
if (!$tt || !$tt.length || "html body".indexOf($tt.prop('nodeName').toLowerCase()) > -1 ) {
break;
}
}
Expand Down

0 comments on commit 0a7e457

Please sign in to comment.