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

Curried onBlur handler not triggered anymore when using v15.6.1 in production mode #10125

Closed
ndresx opened this issue Jul 8, 2017 · 7 comments

Comments

@ndresx
Copy link
Contributor

ndresx commented Jul 8, 2017

Do you want to request a feature or report a bug?
bug?

What is the current behavior?
When switching from v15.6.1's development into production mode, the in the examples below defined curried onBlur handler suddenly stops working. It seems to have something to do with the number of arguments.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).
React v15.6.1 (production, partially working)
http://jsfiddle.net/axc28sfq/

React v15.6.1 (development, fully working)
http://jsfiddle.net/z0mp7gv5/

React v15.1.0 (production, fully working - also works fine in development mode)
http://jsfiddle.net/85w1uL3f/

React v16.0.0-alpha.13 (development, partially working)
https://jsfiddle.net/z0fystqx/

What is the expected behavior?
Whatever the correct usage of the handler function might be in the end, at least the behavior should stay the same across the different build modes?

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
This was working fine with v15.1.0 (development and production).

@gaearon gaearon mentioned this issue Jul 8, 2017
12 tasks
@gaearon
Copy link
Collaborator

gaearon commented Jul 11, 2017

Do you want to look into why this happens? Might be a bug.

@ndresx
Copy link
Contributor Author

ndresx commented Jul 11, 2017

Hello, I started to do so already on a very basic level, but unfortunately won't be able to continue until Saturday. If anybody else wants to take over, please just do so. Also happy for any additional hints.

Since it is working fine in either development or production mode, it most likely has something to do with one of the __DEV__ conditions I guess.

@gaearon
Copy link
Collaborator

gaearon commented Jul 11, 2017

This doesn’t seem to happen on master so you probably won’t reproduce there. We can probably fix this directly in 15-stable branch.

@gaearon
Copy link
Collaborator

gaearon commented Jul 11, 2017

I don't understand the "three arguments" version in your 16 alpha test (https://jsfiddle.net/z0fystqx/).

To me, it seems expected that only "two arguments" version will work. React's contract specifies only one argument: event. You fill in the other one in the render function, so that gives us two. This is why the example with two arguments works. For the example with three arguments, you'd need to fill one more argument to get to the last curried function. If I do that it seems to work: https://jsfiddle.net/mspr65t1/

@gaearon
Copy link
Collaborator

gaearon commented Jul 11, 2017

Okay. I looked at it more and seems like all we need to do is to cherry pick #8363 to the 15 branch.

@gaearon
Copy link
Collaborator

gaearon commented Jul 11, 2017

I'll close because this is fixed on master. I'll add cherry picking to 15.6.2 todos.
Thanks for the report!

@gaearon gaearon closed this as completed Jul 11, 2017
@ndresx
Copy link
Contributor Author

ndresx commented Jul 11, 2017

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants