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

Scroll to bottom of run now dialog #1011

Merged
merged 3 commits into from May 3, 2016

Conversation

Projects
None yet
2 participants
@Calvinp
Contributor

Calvinp commented Apr 28, 2016

If the screen is too small, the 'Run now' button in the dialog will be off the screen, defeating the efforts to make this dialog one-click whenever possible.

With this change, the button will gain focus when the dialog is opened, causing the browser to automatically scroll to the button.

The timeout causes the button to focus again in half a second, which is necessary because Firefox ignores the first focus call (it's too close to trying to focus on the Vex dialog). There are two downsides to this:

  • In Firefox, the UI jumps half a second after the dialog opens, which is kind of awkward. I tested this and the button won't properly be in the viewscreen if the timeout is less than half a second. The only other option is to leave firefox out completely, and let firefox users scroll on their own (which is a valid choice if the jump is too awkward).
  • In other browsers the UI will also jump half a second after the dialog opens. However, it is very difficult to scroll within half a second of opening the dialog, so this seems irrelevant to me. It can be fixed by detecting if the user agent is firefox, but that may lead to other browsers with the same limitation as firefox not scrolling (Looking at you, Internet Explorer - I don't have a machine capable of running IE, so I can't test what it'll do).

@Calvinp Calvinp added the hs_staging label Apr 28, 2016

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas May 3, 2016

Member

This is gtg

Member

ssalinas commented May 3, 2016

This is gtg

@ssalinas ssalinas merged commit ac0e833 into master May 3, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssalinas ssalinas deleted the scroll-to-bottom-of-run-now-dialog branch May 3, 2016

@ssalinas ssalinas modified the milestone: 0.6.0 May 4, 2016

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