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
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "*"
6
6
  ],
7
- "version": "4.22.0",
7
+ "version": "4.22.1",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Terrier-Tech/terrier-engine"
@@ -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