Skip to content

Commit e9cb28d

Browse files
committed
Merge pull request #323 from RareDevil/SubmenuResizeProblem
Properly fixed the problem with submenus size wrongly (thanks @RareDevil)
2 parents d79132f + 6fd2257 commit e9cb28d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/jquery.contextMenu.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@
12411241
// determine width of absolutely positioned element
12421242
$menu.css({position: 'absolute', display: 'block'});
12431243
// don't apply yet, because that would break nested elements' widths
1244-
$menu.data('width', Math.ceil($menu.width()));
1244+
$menu.data('width', Math.ceil($menu.outerWidth()));
12451245
// reset styles so they allow nested elements to grow/shrink naturally
12461246
$menu.css({
12471247
position: 'static',

src/sass/jquery.contextMenu.scss

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
min-width: $context-menu-min-width;
3232
padding: $context-menu-container-padding;
3333
position: absolute;
34-
white-space: pre;
3534
}
3635

3736
.context-menu-item {

0 commit comments

Comments
 (0)