Skip to content

scrollToBottom - Button appears only sometimes #3862

Open
@MatthiasGwiozda

Description

@MatthiasGwiozda

Screenshots

scroll - to - bottom button

Version

Latest (4.13.0)

Describe the bug

The scroll to bottom - button seems to work only sometimes.

Steps to reproduce

  1. create a Dialog in the backend, which sends multiple long messages one after another
  2. use this frontend - example (with your token):
<!DOCTYPE html>
<html>

<head>
    <script crossorigin="anonymous" src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>
    <style>
        html,
        body {
            height: 100%;
        }

        body {
            margin: 0;
        }

        #webchat {
            height: 100%;
            width: 100%;
        }
    </style>
</head>

<body>
    <div id="webchat" role="main"></div>
    <script>
        const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {
          if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
            dispatch({
              type: 'WEB_CHAT/SEND_EVENT',
              payload: {
                name: 'webchat/join',
                value: { language: window.navigator.language }
              }
            });
          }

          return next(action);
        });

        window.WebChat.renderWebChat(
            {
                directLine: window.WebChat.createDirectLine({
                    token: 'INSERT_TOKEN_HERE'
                }),
                userID: 'YOUR_USER_ID',
                username: 'Web Chat User',
                locale: 'de-de',
                store,
                styleOptions: {
                    bubbleBackground: 'rgba(0, 255, 255, .1)',
                    autoScrollSnapOnActivity: true,
                }
            },
            document.getElementById('webchat')
        );
    </script>
</body>

</html>
  1. Start the dialog, which was created in step one multiple times.

Expected behavior

The scroll - to bottom - button should appear always when the dialog is started.

Additional context

For me it looks like a race condition. Maybe the button only appears when the message is sent after a specific time?

[Bug]

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportexempt from daily DRI reportbacklogOut of scope for the current iteration but it will be evaluated in a future release.bugIndicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.front-burnerneeds-scope

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions