Skip to content

Commit

Permalink
#5366, #5975 - Fixes issue with offset not available on window
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Jan 29, 2018
1 parent d1f5ea3 commit 18ac909
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3216,7 +3216,9 @@ $.fn.dropdown = function(parameters) {
;
calculations = {
context: {
offset : $context.offset(),
offset : ($context.get(0) === window)
? { top: 0, left: 0}
: $context.offset(),
scrollTop : $context.scrollTop(),
height : $context.outerHeight()
},
Expand Down Expand Up @@ -3259,7 +3261,9 @@ $.fn.dropdown = function(parameters) {
;
calculations = {
context: {
offset : $context.offset(),
offset : ($context.get(0) === window)
? { top: 0, left: 0}
: $context.offset(),
scrollLeft : $context.scrollLeft(),
width : $context.outerWidth()
},
Expand Down

0 comments on commit 18ac909

Please sign in to comment.