Converse converse.js

Module: converse-chatview

Methods

(private, inner) _markScrolled()

Called when the chat content is scrolled up or down. We want to record when the user has scrolled away from the bottom, so that we don't automatically scroll away from what the user is reading when new messages are received.

Don't call this method directly, instead, call markScrolled, which debounces this method by 100ms.

Source:

(inner) maintainScrollTop()

Scroll to the previously saved scrollTop position, or scroll down if it wasn't set.

Source:

(inner) maybeScrollDown(messageopt)

Scrolls the chat down, if appropriate.

Will only scroll down if we have received a message from ourselves, or if the chat was scrolled down before (i.e. the scrolled flag is false);

Parameters:
Name Type Attributes Description
message _converse.Message | _converse.ChatRoomMessage <optional>
  • An optional message that serves as the cause for needing to scroll down.
Source:

(inner) scrollDown(evopt)

Scrolls the chat down.

This method will always scroll the chat down, regardless of whether the user scrolled up manually or not.

Parameters:
Name Type Attributes Description
ev Event <optional>

An optional event that is the cause for needing to scroll down.

Source: