Botframework-webchat: Preventing focus change on Suggested Action click/press

Created on 8 May 2019  Â·  11Comments  Â·  Source: microsoft/BotFramework-WebChat

[Edit by corinagum: see video for unwanted behavior]
https://drive.google.com/file/d/1sWHcCLFN6NnrxoOriK3iKm3jTXv_pvvS/view

Currently, when pressing/clicking on a suggested action button, the action is performed but then the browser automatically regains focus onto the text input field. Whilst this is nice, on mobile its a distraction because the keyboard is continually being opening when selecting a suggested action.

Is it possible to prevent this functionality via the CDN implementation?

Thanks!

Help wanted P2 front-burner

Most helpful comment

@JessBannister, if your project is due to go live in June and this is a ship-blocker for your team, there's unfortunately not much the Web Chat team can do to help in the short-term. Our next release (4.5) is set for July, and even if we were to prioritize this, your app would not see the benefit of this improvement until the 4.5 release.

If you need this fix in two days, I strongly recommend temporarily forking your version of Web Chat and implementing the fix on your fork. If you do, it would be great if you could also do a Pull Request with the fixes to this project. Doing so ensures that this high priority fix for you will be implemented by our next release and other teams will benefit from the work you contributed. :) Our project is open source and we welcome PRs from the community.

All 11 comments

Related to https://github.com/microsoft/BotFramework-WebChat/issues/1789

Disabling the focus feature is not possible right now.

What browser and mobile device are you on? I'm trying this out with iOS Safari and pressing 'return' to send a message keeps the keyboard open without jumping. This was intentionally added to the code fairly recently.

Jumping starts when I press the 'Send' button to send what I typed. The keyboard closes, and then reopens when I touch the input again to say something.

So this is for the suggested actions which appear just above the input field / ‘send’ button.

However in iOS Safari 12.2 I can see that When the return or send button is tapped the keyboard stays open for any message.

Ahh, my bad I missed a few keywords there.

Can you provide a video or gif of what feature you are requesting a change for? I tried this out iOS safari and there seems to be no jumping when a suggested action is posted.

Hopefully this helps, https://drive.google.com/file/d/1sWHcCLFN6NnrxoOriK3iKm3jTXv_pvvS/view

So in the video when I click on one of the purple buttons, I would like the option to not automatically focus onto the text input field.

I see what you mean. I'm adding this for discussion with the team. Thanks for filing.

I think this request is legit. Keeping mobile UI flow consistently and smooth is important.

I believe, by default, we should not focus on text input after submitting thru any buttons. But I am unsure why we have it there.

Hi, @corinagum I can see this has been added to the Prioritization, I was wondering if there was an ETA on this being implemented?

Hi @jag1989, I believe 4.5 is planned to be sometime around July 15th. Please note however that this issue hasn't been assigned yet and is P2, which is our lowest level priority. I'll do my best to keep it on the list.

Good morning @corinagum

I am the project manager on the project @jag1989 has raised this ticket on behalf of.

Thanks for the update. Sorry in advance for the long read below, however the background on this ticket may help with your prioritisation.

We are due to go live mid June, with client handover and UAT due to commence in the next week or so.

We therefore need to address the below issue prior to this as there is an indirect safeguarding risk that this issue presents, in addition to the poor UX the issue leaves us with.

To give you a little background, this project's mission is to reach vulnerable young people (13 - 18) who may be at risk or directly caught up in sexual exploitation, radicalisation, crime etc, and in the wake of the 2 chatbot apps, Wysa and Woebot, failing to appropriately pick up and respond to safeguarding flags, we have carefully designed and tested with young people the chatbot flow to remove as much free text entry opportunities as possible.

Every design decision has been to remove any potential encouragement for the young person to type free text messages. The opening up of the keyboard makes for a really jarring experience but also distracts away from the button prompts, meaning there is a real risk users will think they are required to type.

It is a rather high profile project, with a lot of eyes on it.

Please can you take the above into account and drop me a line with details on ETA?

Thank you

@JessBannister, if your project is due to go live in June and this is a ship-blocker for your team, there's unfortunately not much the Web Chat team can do to help in the short-term. Our next release (4.5) is set for July, and even if we were to prioritize this, your app would not see the benefit of this improvement until the 4.5 release.

If you need this fix in two days, I strongly recommend temporarily forking your version of Web Chat and implementing the fix on your fork. If you do, it would be great if you could also do a Pull Request with the fixes to this project. Doing so ensures that this high priority fix for you will be implemented by our next release and other teams will benefit from the work you contributed. :) Our project is open source and we welcome PRs from the community.

Hi, can i send the message just by clicking on the desired suggestion. Now if i click on any of the suggestion it will come to the text/input area and i have to press enter again to send the message. I'm using react js as front end for calling webchat. Can anyone help me with this.
Webchat version - 4.7.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

electrobabe picture electrobabe  Â·  4Comments

compulim picture compulim  Â·  3Comments

adriantan08 picture adriantan08  Â·  3Comments

joshm998 picture joshm998  Â·  3Comments

naveen-vijay picture naveen-vijay  Â·  4Comments