aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat/chat_layout_utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chat/chat_layout_utils.js')
-rw-r--r--src/components/chat/chat_layout_utils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/chat/chat_layout_utils.js b/src/components/chat/chat_layout_utils.js
index 609dc0c9..50a933ac 100644
--- a/src/components/chat/chat_layout_utils.js
+++ b/src/components/chat/chat_layout_utils.js
@@ -24,3 +24,10 @@ export const isBottomedOut = (el, offset = 0) => {
export const scrollableContainerHeight = (inner, header, footer) => {
return inner.offsetHeight - header.clientHeight - footer.clientHeight
}
+
+// Returns whether or not the scrollbar is visible.
+export const isScrollable = (el) => {
+ if (!el) return
+
+ return el.scrollHeight > el.clientHeight
+}