-
-
Notifications
You must be signed in to change notification settings - Fork 925
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 value isn't reset if onsubmit event is triggered with enter #288
Comments
Seems like it has to do with the fix for #214. When you press enter, the input retains focus and the value isn't "clobbered"/updated. |
Nevermind, it doesn't work for me either, but does with v21. |
So yeah, I had good convo w/ @bsuh yesterday. Basically, the problem was that I used a hacky workaround to fix #151, which then required another hacky workaround to fix #214, which is now causing this, in a silly domino effect. I'm going to revert the changes to deliberately break #151 again, because now we can use m.redraw.strategy from application space to prevent double redraws. This should restore correct functionality for both #214 and #288 |
Is this going to fix not being able to type into some input fields on On Tue, Sep 30, 2014 at 11:08 PM, Leo Horie notifications@github.com
|
So the issue here was that a non-ideal workaround for #151 caused #214, and the non-ideal workaround for #214 caused this. I'm reverting the workarounds because #151 can be resolved in application space w/ m.redraw.strategy("none") and there's no other reasonable way to fix #214 and #288. This will take effect on the next release (0.1.23) |
@lhorie, thank you! How regularly is mithril released? |
I am writing a simple chat application with mithril. It has a form to enter the message with a onsubmit handler in which the input value is reset. The strange thing is that it works if the event handler is triggered with a click on the submit button; however, it does not if it is triggered by hitting enter. Interestingly, if I add the property to a debug span element, it is updated in both cases.
Tested in latest Chrome and Firefox.
Code:
The text was updated successfully, but these errors were encountered: