-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Input] Dodge the BFcache issue #8110
Conversation
src/Input/Input.js
Outdated
/** | ||
* @ignore | ||
*/ | ||
onFocus?: Function, | ||
onFocus?: (event: SyntheticUIEvent<>) => void, |
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.
Focus event?
src/Input/Input.js
Outdated
/** | ||
* @ignore | ||
*/ | ||
onKeyDown?: Function, | ||
onKeyDown?: (event: SyntheticUIEvent<>) => void, |
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.
Keyboard event?
FYI - I just figured out this change is not compatible with a custom |
src/Input/Input.js
Outdated
const event = new Event('input', { | ||
bubbles: true, | ||
}); | ||
this.input.dispatchEvent(event); |
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.
I have just tried it, it doesn't work. I'm looking into it.
I have opened an issue on the React side facebook/react#10657. Let's dodge the issue for now 👼 . |
de48c81
to
5853b27
Compare
5853b27
to
ae46767
Compare
ae46767
to
b0ad8cb
Compare
b0ad8cb
to
4dac71b
Compare
As-is, the code on v1-beta is broken for users based on a hack for SSR.
I did some research, and successfully simulate the change in the browser.
@oliviertassinari this works in the browser, but it fails with mocha testing. Since I've gotten it this far (and I don't use SSR), I would appreciate if you picked this up and figured out the mocha dom Event compatibility issue and make sure it is SSR compatible for you.
I also more strongly typed the event signatures.
/reference https://stackoverflow.com/a/31056122/2363935