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 onClick doesn't work when input is inside DropdownButton or ButtonToolbar #62
Comments
Hmm, I think this is the same behaviour as the Bootstrap component. I'm not sure we should change it. I think your workaround is reasonable. You could just add one handler to the form like: |
Yes.. it is.. the way they handle it is a jquery hack to be honest. The problem I am facing is adding onClick to the is being ignored. When I click on the input box that shows up in the drop down, nothing happens. onFocus works though... but it doesn't prevent the pop-down menu from disappearing as soon as I click on the input box. I'll try putting it on the form element, see if that helps. On Tuesday, April 8, 2014 7:18 AM, Stephen J. Collings notifications@github.com wrote: Hmm, I think this is the same behaviour as the Bootstrap component. I'm not sure we should change it. I think your workaround is reasonable. — Reply to this email directly or view it on GitHub. |
Ah, ok, I think I misunderstood. I'll look into this. |
Sorry, just got round to looking at this. So at the moment it's expected that children are I think we should support your use case by rendering a |
I looked into this issue, and was unable to reproduce. It appears that the click behavior of the DropdownButton component was addressed in #86.
with click handlers:
The input click handler was triggered, and the event did not propagate up to the DropdownButton. |
@hedgerh Thank you! Closing this issue for now, then, especially with the dropdown rework. |
Why is this is closed?? I still getting the same issue/error! |
@rulyotano because inputs aren't supported in dropdown menus. The current API though does allow you make a custom menu that does support it |
Ok, so the solution is creating your own drop down, and handle a lot of things that custom drop down doesn't, like closing on click out. What is the reason why inputs are not supported! Thanks for answering. |
I am showing a login form with username and password input boxes when a user clicks on a Login button in a DropdownButton which is in a ButtonToolbar. I added onClick to put in a handler to prevent default and stop propagation because currently clicking on the input box causes the menu to close, so I can't type into user input boxes.
The text was updated successfully, but these errors were encountered: