Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus on the input fields of conversation #404

Open
1 task
arekmano opened this issue Mar 17, 2018 · 7 comments
Open
1 task

Focus on the input fields of conversation #404

arekmano opened this issue Mar 17, 2018 · 7 comments

Comments

@arekmano
Copy link
Collaborator

Description
As a user, I would like the web interface to automatically focus on the input field.

Scope of Work

  • Make UI changes so that the form's input field automatically obtain focus.

Demo requirement

  1. The user submits a response
  2. The next question shows up on the interface
  3. The response input field has focus
@arekmano arekmano added this to the Iteration 12 milestone Mar 17, 2018
@arekmano arekmano changed the title Focus on the input of chat Focus on the input fields of conversation Mar 17, 2018
@eeveecc eeveecc self-assigned this Mar 20, 2018
@eeveecc
Copy link

eeveecc commented Mar 22, 2018

cant be done on chat interface...

  1. input textbox is controlled by multiple conditions therefore always show and hide in the DOM tree
  2. manual focus cannot be done. tried couple approaches: 1) settimeout: won't work, since time is different with different response; 2) randomly focus: bad UX
  3. auto focus will be reset everytime the DOM changes.

@arekmano
Copy link
Collaborator Author

this may be naive, but can we programatically call focus upon completion of the http request?

@Vynny
Copy link
Contributor

Vynny commented Mar 23, 2018

You could probably put it in the callback which is called once the request is completed.

@eeveecc
Copy link

eeveecc commented Mar 23, 2018

@arekmano @Vynny It is not the callback, it is the repeatly show the zeus' response in multiple blocks. The input box will show up after the zeus' response is fully showed && all conditions are met, which will take random time. When the prediction is made, the time zeus' response to print on the screen is varies too.

@eeveecc
Copy link

eeveecc commented Mar 23, 2018

Same issue to the landing page too. The first time you open the modal to enter your name, the input box is focused. If you close it and open again it just won't focus again. I guess the v-if just change the DOM and deactivate the autofocus (means it only works when the DOM is loaded at the first time)

@naregeff
Copy link

Testing, can't get it to work.

@arekmano arekmano removed this from the Iteration 13 (Final Release) milestone Apr 14, 2018
@arekmano
Copy link
Collaborator Author

Solution was significantly more complex than initially expected. This will require manipulation of the vue rendering lifecycle to successfully implement. Moved to backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants