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

Scroll to bottom of run now dialog #1011

Merged
merged 3 commits into from May 3, 2016

Conversation

Calvinp
Copy link
Contributor

@Calvinp 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).

@ssalinas
Copy link
Member

ssalinas commented May 3, 2016

This is gtg

@ssalinas ssalinas merged commit ac0e833 into master May 3, 2016
@ssalinas ssalinas deleted the scroll-to-bottom-of-run-now-dialog branch May 3, 2016 19:16
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants