Browse Source

Fix dropdowns inside overflow containers

pull/5122/head
Jack Lukic 8 years ago
parent
commit
619386ebbc
2 changed files with 14 additions and 0 deletions
  1. 8
      RELEASE-NOTES.md
  2. 6
      src/definitions/modules/dropdown.js

8
RELEASE-NOTES.md

@ -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**

6
src/definitions/modules/dropdown.js

@ -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
@ -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';
}
},

Loading…
Cancel
Save