Skip to content

Commit 7bdd734

Browse files
committed
Small fix to calculating width and height for screen edge if padding is present. Closes PR #108
1 parent 97ae461 commit 7bdd734

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

dist/jquery.contextMenu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* MIT License http://www.opensource.org/licenses/mit-license
1313
* GPL v3 http://opensource.org/licenses/GPL-3.0
1414
*
15-
* Date: 2015-09-11T19:12:25.157Z
15+
* Date: 2015-09-11T19:40:21.884Z
1616
*/
1717

1818

@@ -145,8 +145,8 @@
145145
// correct offset if viewport demands it
146146
var bottom = $win.scrollTop() + $win.height(),
147147
right = $win.scrollLeft() + $win.width(),
148-
height = opt.$menu.height(),
149-
width = opt.$menu.width();
148+
height = opt.$menu.outerHeight(),
149+
width = opt.$menu.outerWidth();
150150

151151
if (offset.top + height > bottom) {
152152
offset.top -= height;

0 commit comments

Comments
 (0)