Skip to content

Commit baeb209

Browse files
committed
Better comment
1 parent 21c3bb3 commit baeb209

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

js/markdown-stream/markdown-stream.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,9 @@ class MarkdownElement extends LightElement {
285285
if (el.scrollHeight > el.clientHeight) return el;
286286
el = el.parentElement;
287287
if (el?.tagName === CHAT_CONTAINER_TAG) {
288-
// Stop searching for scrollable parents if we reach <shiny-chat-container>.
289-
// If the chat is scrollable, a scrollable element would've been found already.
288+
// This ensures that we do not accidentally scroll a parent element of the chat
289+
// container. If the chat container itself is scrollable, a scrollable element
290+
// would already have been identified.
290291
break;
291292
}
292293
}

shiny/www/py-shiny/markdown-stream/markdown-stream.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)