-
Notifications
You must be signed in to change notification settings - Fork 972
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
Second Button or IconButton fires submit event #953
Comments
Changing onClick to onMouseUp fix the second error, now callback is only called when click on button. But still on clicking it fires the on submit form event. BTW.- Maybe a bad reference on event delegation? |
I guess it was happening because by default if the button has no type it seems like it submits the form if it's contained in it. I've added a default |
Thank you |
* dev: (285 commits) Fixes react-toolbox#1016 Enable theming of Input component inside Dropdown component. Related to react-toolbox#877 and react-toolbox#920 and commit #d0a9032 Make Tooltip use currentTarget instead of target when calculating the position Allow Tooltip factory to use string native components Make chips avatar detection work when decorated Release 1.3.1 Fixes react-toolbox#1007 Fixes react-toolbox#1001 Dropdown auto fix Fixes react-toolbox#236 Fixes react-toolbox#964 Fixes react-toolbox#999 Release 1.3.0 Add tooltipShowOnClick to README add required attribute to DropdownProps interface Extend extensions Pass event to selection. Fix react-toolbox#939 Fix react-toolbox#409 Fix react-toolbox#953 ... # Conflicts: # components/autocomplete/Autocomplete.js # lib/autocomplete/Autocomplete.js # lib/button/Button.js # lib/button/IconButton.js # lib/checkbox/Checkbox.js # lib/date_picker/Calendar.js # lib/date_picker/CalendarDay.js # lib/date_picker/CalendarMonth.js # lib/date_picker/DatePicker.js # lib/date_picker/DatePickerDialog.js # lib/dropdown/Dropdown.js # lib/form/Form.js # lib/hoc/ActivableRenderer.js # lib/hoc/Portal.js # lib/input/Input.js # lib/list/List.js # lib/list/ListItem.js # lib/list/ListItemContent.js # lib/menu/IconMenu.js # lib/menu/Menu.js # lib/menu/MenuItem.js # lib/overlay/Overlay.js # lib/progress_bar/ProgressBar.js # lib/radio/RadioButton.js # lib/radio/RadioGroup.js # lib/ripple/Ripple.js # lib/slider/Slider.js # lib/snackbar/Snackbar.js # lib/switch/Switch.js # lib/table/Table.js # lib/table/TableRow.js # lib/tabs/Tab.js # lib/tabs/TabContent.js # lib/tabs/Tabs.js # lib/tabs/__tests__/index.spec.js # lib/time_picker/Clock.js # lib/time_picker/ClockFace.js # lib/time_picker/ClockHand.js # lib/time_picker/ClockHours.js # lib/time_picker/ClockMinutes.js # lib/time_picker/TimePicker.js # lib/time_picker/TimePickerDialog.js # lib/tooltip/Tooltip.js
@javivelasco: This broke our application since all our buttons in a form is no longer of type submit. I do not get why this wasn't a major release. |
Sorry about it @drager I never thought it would create an issue since having a submit button usually means adding the |
@javivelasco: Great! Thanks for a great project. |
I have one Button with type submit and I created another Button/IconButton (I tested both) clicking on this fires the submit event on form.
EDIT: And if I add the onClick on the second button all input fields call this callback
The text was updated successfully, but these errors were encountered: