BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Auto scroll broken with autoScrollSnapOnPage on Android devices

Open nickn418 opened this issue 3 years ago • 1 comments

Is it an issue related to Adaptive Cards?

  • [ ] Yes, this is an Adaptive Card issue but it is specific to Web Chat.

Do you have any screenshots?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

NPM

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Browser: Chrome (latest), Platform: Android

Which area does this issue affect?

Chat history

Is this an accessibility issue?

  • [ ] Yes, this is an accessibility issue.

Please describe the bug

Auto scrolling the transcript is broken on Android devices running the Chrome browser with the autoScrollSnapOnPage style option set to true.

Do you see any errors in console log?

Uncaught TypeError: Cannot read properties of null (reading 'offsetTop') at BasicTranscript.js:817:1 at Composer.js:309:1 at Composer.js:477:1

How to reproduce the issue?

  1. Start WebChat with styleOptions using { autoScrollSnapOnPage: true }
  2. Open WebChat using the Chrome browser on an android device
  3. Type a message that will receive a response

What is the expected and actual behavior?

Expected: Chat transcript scrolls down when an incoming message is received.

Actual: Chat transcript does not scroll down to reveal the received message.

Adaptive Card JSON

No response

Additional context

Transcript activity snapping uses the class from the active descendant element to calculate scroll offset: https://github.com/microsoft/BotFramework-WebChat/blob/v4.15.3/packages/component/src/BasicTranscript.tsx#L841

On Android devices the active descendent is not rendered because of an Android TalkBack bug workaround: https://github.com/microsoft/BotFramework-WebChat/blob/v4.15.3/packages/component/src/Transcript/ActivityRow.tsx#L79

nickn418 avatar Sep 06 '22 02:09 nickn418

Any news on this ?

mihaiManea89 avatar Mar 18 '25 10:03 mihaiManea89