terrier-engine 4.22.0 → 4.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -171,7 +171,7 @@ export class SelectOptionsDropdown extends Dropdown<SelectFieldDropdownState> {
|
|
|
171
171
|
let scrollAmount = selectedElement.offsetTop - anchorRect.top
|
|
172
172
|
let scrollTop = anchorRect.y + (anchorRect.height / 2) - (selectOptionSize.height / 2)
|
|
173
173
|
|
|
174
|
-
if (dropdown.offsetHeight > win.height - anchorRect.top) { // attempting to fill the whole window height with the dropdownContainer, so we need to adjust scroll of dropdownContainer
|
|
174
|
+
if (dropdown.offsetHeight > win.height - anchorRect.top || anchorRect.top - dropdown.offsetHeight < 0) { // attempting to fill the whole window height with the dropdownContainer, so we need to adjust scroll of dropdownContainer
|
|
175
175
|
if (scrollAmount < 0) { // space above the dropdown
|
|
176
176
|
dropdown.style.marginTop = `${-scrollAmount}px`
|
|
177
177
|
scrollTop = 0
|