Nathan Hunzaker
nhunzaker

Organizations

@vigetlabs @sift
Jul 29, 2016
nhunzaker commented on pull request facebook/react#7343
@nhunzaker

It works as expected. The bubbling is handled by the synthetic event system. Best I can tell, the whole reason for the stopPropagation logic is for…

Jul 29, 2016
nhunzaker commented on issue facebook/react#7233
@nhunzaker

Is it possible that this is a bug in Chrome for Android? Checkout this codepen: http://codepen.io/nhunzaker/pen/GqBqWo Directly assigning defaultValue

Jul 29, 2016
nhunzaker commented on pull request facebook/react#7343
@nhunzaker

Technically no, though it's against the React style guide all the same. ESLint seems to struggle with else if. The only other valid option I can m…

Jul 29, 2016
nhunzaker commented on pull request facebook/react#7359
@nhunzaker

Type coercion solved my problems, however it makes the initial case hard. Empty inputs are always equal to 0. I think this could be better. Any su…

Jul 29, 2016
Jul 29, 2016
nhunzaker commented on pull request facebook/react#7359
@nhunzaker

Ah and it looks like lint is going to fail because my solution relies on type coercion. Hmm. Do I have permission to ignore these rules?

Jul 29, 2016
nhunzaker commented on pull request facebook/react#7359
@nhunzaker

Cases enumerated here: #7253 (comment)

Jul 29, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Here are the cases that I'm covering, using the following code as a test case: https://gist.github.com/nhunzaker/923efbaddca16ae2384b547555157f61 D…

Jul 29, 2016
@nhunzaker
  • @nhunzaker d659383
    Use coercion to be smart about value assignment
Jul 29, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Okay. I've polished up #7359. It fixes all issues with uncontrolled and controlled inputs that I have encountered. I'll put in some extra time to m…

Jul 29, 2016
nhunzaker commented on pull request facebook/react#7359
@nhunzaker

@zpao Thanks for the historical insight. All tests pass. I believe I've caught every edge case. I'll enumerate them in #7253. I'm happy to add back…

Jul 29, 2016
@nhunzaker
  • @nhunzaker 8ddae86
    Properly cover defaultValue
Jul 29, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Here's a quick GIF: Now it looks like I was dumb and pushed this update to the uncontrolled input fix I sent out here: #7359 I'll work on getting …

Jul 29, 2016
nhunzaker commented on pull request facebook/react#7359
@nhunzaker

Ack! I crossed the streams! This PR was supposed to be solely for fixing defaultValue, but it looks I got my branches mixed up and pushed the more …

Jul 29, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Okay! So it looks like the issue here is that value is being assigned using the standard React method of updating attributes when the props get pas…

Jul 28, 2016
@nhunzaker
  • @nhunzaker f215173
    Do not set value if it is the same
Jul 28, 2016
nhunzaker commented on pull request facebook/react#7343
@nhunzaker

Anything else to follow up on here?

nhunzaker deleted branch 10.0.0 at vigetlabs/microcosm
Jul 27, 2016
nhunzaker deleted branch 9.19.x at vigetlabs/microcosm
Jul 27, 2016
Jul 27, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

No worries, sounds fun! If there's a quick reference point, could you reveal more about the Chrome fix? What was actually broken?

Jul 27, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

@jimfb You mentioned: That's because Firefox doesn't fire an onChange if the input's value is invalid. It's an interesting way of sidestepping the…

Jul 27, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Ahhhh interesting. Maybe I was just in the dark, but assigning defaultValue causes side-effects on value. It seems to trigger validation on value. C…

Jul 27, 2016
Jul 27, 2016
nhunzaker commented on pull request vigetlabs/microcosm#121
@nhunzaker

Huge 👍

Jul 27, 2016
nhunzaker commented on pull request vigetlabs/microcosm#121
@nhunzaker

Ouch.... jeez.

Jul 27, 2016
nhunzaker commented on pull request vigetlabs/microcosm#121
@nhunzaker

😍

Jul 26, 2016
Jul 26, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Would it be crazy to consider not emitting changes for invalid input? In the case I've detailed above, the stepMismatch validation returns:

Jul 26, 2016
nhunzaker commented on issue facebook/react#7253
@nhunzaker

Confirmed for me on: Version 52.0.2743.82 Specifically, it looks like input.value is lopping off the decimal point: To reproduce: <!DOCTYPE html> <h…

Jul 25, 2016
nhunzaker commented on pull request facebook/react#7343
@nhunzaker

Alright. I think I'm set!