Skip to content

Commit

Permalink
Fix dropdowns inside overflow containers
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Mar 2, 2017
1 parent a3a1763 commit 619386e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## RELEASE NOTES

### Version 2.2.11 - February 21, 2017

**Bugs**

- **Button** - Fixes `@basicActiveBoxShadow` being used incorrectly in basic button variables
- **Visibility** - Fixes issue where visibility events would occur improperly when using a `context` that have `overflow-x` or `overflow-y` set to `auto`
- **Dropdown** - Fixes an issue where dropdown would not correctly open `upward` at bottom edge of the screen when using a `context` with `overflow-x` or `overflow-y` set to `auto`

### Version 2.2.10 - February 21, 2017

**Bugs**
Expand Down
6 changes: 6 additions & 0 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3069,6 +3069,9 @@ $.fn.dropdown = function(parameters) {
height: $currentMenu.outerHeight()
}
};
if(module.is.verticallyScrollableContext()) {
calculations.menu.offset.top += calculations.context.scrollTop;
}
onScreen = {
above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.menu.height,
below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top + calculations.menu.height
Expand Down Expand Up @@ -3142,6 +3145,9 @@ $.fn.dropdown = function(parameters) {
? $subMenu.hasClass(className.visible)
: $menu.hasClass(className.visible)
;
},
verticallyScrollableContext: function() {
return $context.get(0) !== window && $context.css('overflow-y') == 'auto';
}
},

Expand Down

0 comments on commit 619386e

Please sign in to comment.