Botframework-webchat: The keyboard opens automatically after clicking on a suggestion action button on Webchat with version 4.7.1 or 4.7.0 or latest

Created on 23 Jan 2020  路  13Comments  路  Source: microsoft/BotFramework-WebChat

Issue with webchat version : 4.7.1 or 4.7.0 or latest
On Mobile Anroid (Samsung S9), or Iphone (8)

Sample of the issue (the keyboard open automatically after clicking on a suggestion action button)
Before clicking on the suggest action button "Oui"
image

After clicking on the suggest action button "Oui", we have the keyboard opened.
image

The code we are using in order to send the suggested action
image

When you click on the button, we need to have the value clicked on the right of the transcript of the conversation.
image

The behavior we have in 4.6.0, the keyboard stay closed ! :)
@stevkan thanks for you help ;)

Bot Services Bug customer-replied-to customer-reported

Most helpful comment

Prefer not to detect whether it is mobile or not, but put the behavior across both platforms (not focus on send box after click). Because if you use Surface on tablet mode, it could suffer the same problem too.

All 13 comments

@didaskein It looks like this behavior is intended. The suggested action onClick handler calls focusSendBox which should trigger the keyboard to appear. However, I do agree that this creates a clunky user experience for mobile devices. @compulim @corinagum We should consider changing this behavior for mobile or only focus on the send box if it had focus prior to the user clicking the suggested action.

https://github.com/microsoft/BotFramework-WebChat/blob/dfb489304834de8b9579da2adea1474f37cba655/packages/component/src/SendBox/SuggestedAction.js#L47

There are at least 2 issues related to this topic in previous issues. Can we try and pull those up?

Hi @didaskein : @tdurnford gave a response. Please reopen if you have any further questions. Thanks.

Reopening to track this work item

Prefer not to detect whether it is mobile or not, but put the behavior across both platforms (not focus on send box after click). Because if you use Surface on tablet mode, it could suffer the same problem too.

Please link two issues with this so we can understand the bigger picture.

@tdurnford @corinagum could you please update this issue? Thanks :)

@compulim to look at suggested actions and focus management on other channels in mobile environments (teams, facebook, etc)

After suggested actions button is clicked, we can focus back to role="complementary" as it has tabIndex="-1". It also have keypress trap to send focus to send box on keydown.

The original fix (no keyboard) was #1971.

But it was reverted because of an accessibility issue #2608.

I am reading the WCAG 2.4.3 Focus Order to see which path we should choose.

FYI, we have a PR for this now, #3213.

Thank you guys ! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corinagum picture corinagum  路  3Comments

electrobabe picture electrobabe  路  4Comments

joshm998 picture joshm998  路  3Comments

naveen-vijay picture naveen-vijay  路  4Comments

mmalaiarasan-conga picture mmalaiarasan-conga  路  3Comments