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

feat: restore focus upon dialog close #630

Merged
merged 1 commit into from
Nov 16, 2020
Merged

feat: restore focus upon dialog close #630

merged 1 commit into from
Nov 16, 2020

Conversation

sgratzl
Copy link
Member

@sgratzl sgratzl commented Nov 12, 2020

closes #598

Prerequisites:

  • Unless it is a hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

Summary

restores the old focus upon closing a dialog which forces the focus on the close button.

focus

@sgratzl sgratzl requested a review from tildechris November 12, 2020 19:04
@sgratzl sgratzl self-assigned this Nov 12, 2020
@netlify
Copy link

netlify bot commented Nov 12, 2020

Preview link ready!

Built with commit a8ccd1d

https://deploy-preview-630--cmu-delphi-covidcast.netlify.app

Copy link
Contributor

@dlaliberte dlaliberte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Works fine.

Though it seems like this should be a feature built-in to a dialog widget. Also, a weird edge case: it can only remember one previous oldFocus, so if you switch from the previously focused thing to yet another thing, it will still restore focus to the previously focused thing.

Copy link
Contributor

@tildechris tildechris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Sam.

@sgratzl sgratzl merged commit 31ff664 into dev Nov 16, 2020
@sgratzl sgratzl deleted the sgratzl/focusback branch November 16, 2020 17:35
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.

3 participants