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

[POC] Fix popover issues on docs page in Firefox and Chrome #287

Closed
wants to merge 24 commits into from

Conversation

cmslewis
Copy link
Contributor

@cmslewis cmslewis commented Dec 1, 2016

[ ⚠️ This is just a proof-of-concept. Don't merge in its current state. ]

Fixes #231

Changes proposed in this pull request:

  • Wrap a setTimeout around the call to focus on the popover container element after it renders (we're currently focusing before the container is visible, so the browser is simply scrolling down tot the invisible .pt-portal at the bottom of the page).

Reviewers should focus on:

  • This PR builds on my work in Fix overlay issues #276, so the diff here looks much bigger than it really is. Merging that PR to master will reveal the true changes here, so let's do that before merging this one.
  • This is an incremental step in the right direction, not a total fix for all the popover woes we're seeing on the docs page. In particular, popovers still behave erratically on the docs page in Safari. More to come in a future PR for that issue.

@cmslewis cmslewis changed the title Cl/popover fixes Fix popover issues in Firefox and Chrome Dec 1, 2016
@cmslewis cmslewis changed the title Fix popover issues in Firefox and Chrome Fix popover issues on docs page in Firefox and Chrome Dec 1, 2016
@@ -284,7 +307,7 @@ export class Overlay extends React.Component<IOverlayProps, IOverlayState> {
if (autofocusElement != null) {
autofocusElement.focus();
} else {
containerElement.focus();
setTimeout(containerElement.focus);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is the only real change in this PR.

@cmslewis cmslewis changed the title Fix popover issues on docs page in Firefox and Chrome [POC] Fix popover issues on docs page in Firefox and Chrome Dec 2, 2016
@cmslewis
Copy link
Contributor Author

cmslewis commented Dec 8, 2016

Closing in favor of #326.

@cmslewis cmslewis closed this Dec 8, 2016
@adidahiya adidahiya deleted the cl/popover-fixes branch December 23, 2016 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants