We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 120810b commit ff17ae1Copy full SHA for ff17ae1
common/loginpage/src/menu.js
@@ -115,12 +115,14 @@ Menu.prototype.show = function(pos, data) {
115
pos.left -= (_right - _rlimit + 4);
116
}
117
118
- let _top = $dd.height() + pos.top,
119
- _blimit = $(document).height();
120
- if (!!this.config.bottomlimitoffset)
121
- _blimit -= this.config.bottomlimitoffset;
122
- if (!!_top && _top > _blimit) {
123
- pos.top -= (_top - _blimit + 4);
+ const dropdownHeight = $dd.outerHeight();
+ let documentHeight = $(document).height();
+ if (!!this.config.bottomlimitoffset) {
+ documentHeight -= this.config.bottomlimitoffset;
+ }
+
124
+ if ((pos.top + dropdownHeight) > documentHeight) {
125
+ pos.top = documentHeight - dropdownHeight - 4;
126
127
128
$el.css(pos);
0 commit comments