Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
wizard next prevent default check moved to prevent finish event (fix
Browse files Browse the repository at this point in the history
…#1347)
  • Loading branch information
swilliams committed Jun 9, 2015
1 parent 6086018 commit f98c812
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions js/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,16 @@
},

next: function () {
if (this.currentStep < this.numSteps) {
var e = $.Event('actionclicked.fu.wizard');
this.$element.trigger(e, {
step: this.currentStep,
direction: 'next'
});
if (e.isDefaultPrevented()) {
return;
}// respect preventDefault in case dev has attached validation to step and wants to stop propagation based on it.
var e = $.Event('actionclicked.fu.wizard');
this.$element.trigger(e, {
step: this.currentStep,
direction: 'next'
});
if (e.isDefaultPrevented()) {
return;
}// respect preventDefault in case dev has attached validation to step and wants to stop propagation based on it.

if (this.currentStep < this.numSteps) {
this.currentStep += 1;
this.setState();
} else {//is last step
Expand Down

0 comments on commit f98c812

Please sign in to comment.