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

Add support for "invalid" event within Form elements #5187

Merged
merged 1 commit into from Oct 17, 2015

Conversation

Projects
None yet
4 participants
@tomduncalf
Copy link
Contributor

commented Oct 15, 2015

Fixes #5152

@@ -687,6 +698,19 @@ ReactDOMComponent.Mixin = {
},

/**
* Setup this component to trap non-bubbling events locally

This comment has been minimized.

Copy link
@tomduncalf

tomduncalf Oct 15, 2015

Author Contributor

I'm not sure if this description suffices but I didn't know how else to describe what it does!

@tomduncalf

This comment has been minimized.

Copy link
Contributor Author

commented Oct 15, 2015

Feedback welcome on approach and on how to unit/integration test this

@jimfb

This comment has been minimized.

Copy link
Contributor

commented Oct 16, 2015

I don't see anything wrong here; looks good to me. @tomduncalf Did you test it manually in a browser to verify it works? It is possible to write tests that fire mocked events, but honestly it's pretty fragile.

@tomduncalf

This comment has been minimized.

Copy link
Contributor Author

commented Oct 16, 2015

Yes, tested manually - can share the test case if you like. Couldn't see anywhere obvious to hook into unit testing it!

On 16 Oct 2015, at 20:21, Jim notifications@github.com wrote:

I don't see anything wrong here; looks good to me. @tomduncalf Did you test it manually in a browser to verify it works? It is possible to write tests that fire mocked events, but honestly it's pretty fragile.


Reply to this email directly or view it on GitHub.

@jimfb

This comment has been minimized.

Copy link
Contributor

commented Oct 17, 2015

Ok, looks good to me. Thanks @tomduncalf!

jimfb added a commit that referenced this pull request Oct 17, 2015

Merge pull request #5187 from tomduncalf/support_invalid_event-issue_…
…5152

Add support for "invalid" event within Form elements

@jimfb jimfb merged commit 7a164fd into facebook:master Oct 17, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
this._wrapperState = {
listeners: null,
};
transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);

This comment has been minimized.

Copy link
@sophiebits

sophiebits Oct 18, 2015

Collaborator

The mountWrapper calls in input, select, and textarea should include the listeners property in their _wrapperState to avoid changing the hidden class when the assignment is made. This would also be better just as a free function – we're trying to get away from OO in the core anyway.

This comment has been minimized.

Copy link
@tomduncalf

tomduncalf Oct 19, 2015

Author Contributor

@spicyj Makes sense - probably worth raising a separate issue for this as this PR is now merged

This comment has been minimized.

Copy link
@sophiebits

sophiebits Oct 19, 2015

Collaborator

I know it's merged. I was hoping that one of you would want to post a PR to fix it but I did it myself in #5213.

This comment has been minimized.

Copy link
@tomduncalf

tomduncalf Oct 19, 2015

Author Contributor

Cool - thank you!

@tomduncalf tomduncalf deleted the tomduncalf:support_invalid_event-issue_5152 branch Oct 19, 2015

sophiebits added a commit to sophiebits/react that referenced this pull request Oct 19, 2015

sophiebits added a commit that referenced this pull request Oct 19, 2015

@zpao zpao referenced this pull request Oct 30, 2015

Closed

Support "invalid" event #5337

@tvler tvler referenced this pull request Sep 6, 2017

Merged

Add onInvalid to react props #322

4 of 4 tasks complete

@renovate renovate bot referenced this pull request Feb 2, 2018

Open

Update dependency react to v0.14.9 #29

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.