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

Allow developer to configure auto focus on the grid (addresses #813) #845

Merged
merged 6 commits into from
Nov 6, 2017

Conversation

supamanda
Copy link
Contributor

Description

A PR to allow developer to configure whether the grid should steal focus when the browser is focused on the body. Addresses #813

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[ ] Bugfix
[x ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
The grid steals focus when the browser is focused on the body, see #813

What is the new behavior?
Allow developer to configure whether grid should autofocus when browser is focused on the body

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x ] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 9ab8687 on supamanda:ah-allow-configure-auto-focus into ** on adazzle:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 68a6ddb on supamanda:ah-allow-configure-auto-focus into ** on adazzle:master**.

@theunixbeard
Copy link

👍 This PR looks great, Amanda, and would really help w/ my app as well.

It seems like any app w/ a complex enough UI to require scrolling would run into this issue, so it's definitely important.

Though referencing the solution in my older PR from a few months back (#704), this video demonstrates the problem in any easy to understand manner: https://www.youtube.com/watch?v=xejQdVGJX6w

With the configuration flag in Amanda's solution, app's like mine and Mike's (#813) could simply set the flag to false and get the behavior we want while leaving everyone else unaffected.

@malonecj any thoughts on this? Seems like there are no conflicts to a merge.

@thom801
Copy link

thom801 commented Jul 28, 2017

@supamanda I am also needing this feature. Can this be merged? Any way I can help?

Amanda Helliwell added 3 commits July 31, 2017 15:20
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 57588ed on supamanda:ah-allow-configure-auto-focus into ** on adazzle:master**.

@supamanda
Copy link
Contributor Author

hi @thom801 , I just fixed the merge conflicts, so it's good to go again. In the meantime, I've come up with a workaround I'd be happy to share with you if you need it

@scrambled2k3
Copy link

Any time frame on when this can get merged in? I too am experiencing this and would love to disable it.

@cohuttaboy79
Copy link

I am also having this issue and having the ability to disable the functionality would be much appreciated.

@scrambled2k3
Copy link

@supamanda would you mind sharing with me your workaround?

@supamanda
Copy link
Contributor Author

hi @scrambled2k3
My work around is to define my own row renderer, and override the checkFocus function; and then define my own Grid which uses the my row renderer. Code attached :)

noautofocus.zip

# Conflicts:
#	packages/react-data-grid/src/ReactDataGrid.js
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3478fb2 on supamanda:ah-allow-configure-auto-focus into ** on adazzle:master**.

@malonecj malonecj merged commit 3dbc315 into adazzle:master Nov 6, 2017
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.

7 participants