@connectif/ui-components 2.0.8 → 2.0.9

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/dist/index.js CHANGED
@@ -13937,10 +13937,10 @@ var Chat = ({
13937
13937
  if (!lastChildren) {
13938
13938
  lastChildren = lastElementClass;
13939
13939
  }
13940
- const scrollTo = lastElementClass.offsetTop - lastElementClass.offsetHeight - gapBetweenElements;
13941
- const innerRefScroll = lastChildren.offsetTop;
13940
+ const scrollTo = lastElementClass.offsetTop - gapBetweenElements;
13941
+ const innerRefScroll = lastChildren.offsetTop + lastChildren.offsetHeight;
13942
13942
  const scrolledHeight = innerRefScroll - scrollTo;
13943
- return clientHeight - scrolledHeight;
13943
+ return Math.max(clientHeight - scrolledHeight, 0);
13944
13944
  }
13945
13945
  return PADDING_BOTTOM;
13946
13946
  },