Skip to content

Commit

Permalink
data-coreui-toggle="loading-button" prevents submitting action
Browse files Browse the repository at this point in the history
  • Loading branch information
vladrusu committed Oct 15, 2024
1 parent c0e7285 commit 28b18f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/src/loading-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ class LoadingButton extends BaseComponent {
*/

EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
event.preventDefault()
// commented because otherwise this won't trigger submit: <button type="submit" data-coreui-toggle="loading-button">Save</button>
//event.preventDefault()
const button = event.target.closest(SELECTOR_DATA_TOGGLE)
const data = LoadingButton.getOrCreateInstance(button)

Expand Down

0 comments on commit 28b18f4

Please sign in to comment.