From 6fd225719f9f6af84ca9e696b9f3fd0021b4f9cc Mon Sep 17 00:00:00 2001 From: RareDevil Date: Thu, 17 Dec 2015 09:12:54 +0100 Subject: [PATCH] Properly fixed the problem with submenus size wrongly --- src/jquery.contextMenu.js | 2 +- src/sass/jquery.contextMenu.scss | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jquery.contextMenu.js b/src/jquery.contextMenu.js index fad9ff62..d7935404 100644 --- a/src/jquery.contextMenu.js +++ b/src/jquery.contextMenu.js @@ -1236,7 +1236,7 @@ // determine width of absolutely positioned element $menu.css({position: 'absolute', display: 'block'}); // don't apply yet, because that would break nested elements' widths - $menu.data('width', Math.ceil($menu.width())); + $menu.data('width', Math.ceil($menu.outerWidth())); // reset styles so they allow nested elements to grow/shrink naturally $menu.css({ position: 'static', diff --git a/src/sass/jquery.contextMenu.scss b/src/sass/jquery.contextMenu.scss index 3063ba09..53249216 100644 --- a/src/sass/jquery.contextMenu.scss +++ b/src/sass/jquery.contextMenu.scss @@ -31,7 +31,6 @@ min-width: $context-menu-min-width; padding: $context-menu-container-padding; position: absolute; - white-space: pre; } .context-menu-item {