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

Regression in 1.0.0-rc.13 #22

Closed
radekmie opened this issue Jun 7, 2016 · 16 comments
Closed

Regression in 1.0.0-rc.13 #22

radekmie opened this issue Jun 7, 2016 · 16 comments
Assignees
Labels
Type: Bug Bug reports and their fixes

Comments

@radekmie
Copy link
Contributor

radekmie commented Jun 7, 2016

Moved from #17:

@serkandurusoy:

@radekmie I think this has created a regression. Now the validation is constantly running and interestingly logging warnings in the console and moving the text cursor to the end of the input!

For example try entering text into the middle of an existing input that does not pass validation

image

notice also the logs! I'm not logging this and interestingly, I have not even submitted the form and it is not autosave either.
@radekmie I confirm that this is a regression. Reverting back to 12 fixes the problem.

@radekmie radekmie added the Type: Bug Bug reports and their fixes label Jun 7, 2016
@radekmie radekmie self-assigned this Jun 7, 2016
@radekmie
Copy link
Contributor Author

radekmie commented Jun 7, 2016

@serkandurusoy, I've tried to reproduce this behaviour, but I couldn't. Also, I've checked the whole repository and there's no single warning (even no console outside the README). Could you post an example?

@serkandurusoy
Copy link
Contributor

@radekmie here's a minimal reproduction repo

https://github.com/serkandurusoy/uniforms-issue22-reproduction

@radekmie
Copy link
Contributor Author

radekmie commented Jun 8, 2016

Great! I'll take care of this.

@radekmie
Copy link
Contributor Author

radekmie commented Jun 8, 2016

This looks like an React bug itself - I've created an issue for that.

@serkandurusoy
Copy link
Contributor

@radekmie what about the normal text types?

they, too have the cursor moving to the end problem!

The strange thing is, the problem goes away when I revert to rc.12 what do you think about that?

@radekmie
Copy link
Contributor Author

radekmie commented Jun 8, 2016

I've made git bisect and #19 is the problem. The main change is dynamic type.

@serkandurusoy
Copy link
Contributor

Yeah I'm actually looking at it right now and trying something, I'll let you know in a minute

@serkandurusoy
Copy link
Contributor

@radekmie I just pushed an update to my repo and included two custom components (text and email) that does not have dynamic type definition, but it still behaves the same,

  • validation gets logged
  • the cursor jumps

so it may not be related to #19 but a combination of the other changes with #19

the cursor jumping might be a clue here about where we set the state of the value/error of the component such that it receives a rerender probably!

@serkandurusoy
Copy link
Contributor

Please give me a minute and I'll try something even better, I'll base a custom component on rc.12!

@serkandurusoy
Copy link
Contributor

@radekmie please take a look at https://github.com/serkandurusoy/uniforms-issue22-reproduction/tree/rc12-with-dynamic-type

this is basically rc.12 + #19 combined and excluding #17 changes

dynamic type is not a problem

@serkandurusoy
Copy link
Contributor

Hmm, why did you remove this line:

4a56596#diff-5d9d3a42e5c2e10ea4135efba1608dc4L82

@serkandurusoy
Copy link
Contributor

I now tried rc.14 but did not make a difference in terms of this problem.

@radekmie
Copy link
Contributor Author

radekmie commented Jun 8, 2016

I've removed it, because now setState is called either in callback of onValidate or directly few lines later.

@serkandurusoy
Copy link
Contributor

Yeah, that's what I thought but just wanted to make sure.

This is now becoming a mystery!

@serkandurusoy
Copy link
Contributor

@radekmie I do confirm that this now solves this problem. thanks!

@serkandurusoy
Copy link
Contributor

@radekmie part of the problem (the log messages about invalid inputs seen in the screenshot) started appearing again after the recent updates rc.23 and react 15.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

2 participants