-
Notifications
You must be signed in to change notification settings - Fork 809
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
[fixed] incorrect focusAfterRender on componentDidUpdate. #424
Conversation
Hi @lindskogen, thank you. There are a few lint problems. You can use |
@lindskogen One last thing, can you rewrite the commit message to start with |
@diasbruno I think that did it! |
1 similar comment
I was trying to reproduce this issue (#315) and I think got it. Unfortunately, this won't fix the issue, but it will be merged as a recommendation/good practice. |
src/components/ModalPortal.js
Outdated
@@ -122,7 +130,8 @@ export default class ModalPortal extends Component { | |||
} | |||
|
|||
// Don't steal focus from inner elements | |||
focusContent = () => (!this.contentHasFocus()) && this.content.focus(); | |||
focusContent = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've forgot to remove this trailing space after =>
.
1 similar comment
@lindskogen thank you so much! |
Released |
Maybe fixes #315.
Issue #315 seems to be a problem with inconsistent state when using react-modal with
redux
[1] (all errors seems to be reported by developer using redux).It's not a proper fix since this behaviour was not reproduced, but it should be safe.
[1] - maybe a redux and/or component state async update. (?)
Changes proposed:
this.content
is not available.Acceptance Checklist:
CONTRIBUTING.md
.