Skip to content

Commit 6fd2257

Browse files
committed
Properly fixed the problem with submenus size wrongly
1 parent 9551a9a commit 6fd2257

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/jquery.contextMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@
12361236
// determine width of absolutely positioned element
12371237
$menu.css({position: 'absolute', display: 'block'});
12381238
// don't apply yet, because that would break nested elements' widths
1239-
$menu.data('width', Math.ceil($menu.width()));
1239+
$menu.data('width', Math.ceil($menu.outerWidth()));
12401240
// reset styles so they allow nested elements to grow/shrink naturally
12411241
$menu.css({
12421242
position: 'static',

src/sass/jquery.contextMenu.scss

Lines changed: 0 additions & 1 deletion
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)