diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 61d9619ea..a37438001 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -3259,6 +3259,7 @@ $.fn.dropdown = function(parameters) { ; calculations = { context: { + offset : $context.offset(), scrollLeft : $context.scrollLeft(), width : $context.outerWidth() }, @@ -3270,7 +3271,7 @@ $.fn.dropdown = function(parameters) { if(module.is.horizontallyScrollableContext()) { calculations.menu.offset.left += calculations.context.scrollLeft; } - isOffscreenRight = (calculations.menu.offset.left + calculations.menu.width >= calculations.context.scrollLeft + calculations.context.width); + isOffscreenRight = (calculations.menu.offset.left - calculations.context.offset.left + calculations.menu.width >= calculations.context.scrollLeft + calculations.context.width); if(isOffscreenRight) { module.verbose('Dropdown cannot fit in context rightward', isOffscreenRight); canOpenRightward = false;