Skip to content

"onNext" with return false does not Prevent Wizard from Continuing #8

@rfizzle

Description

@rfizzle

Checklist

  • I'm using version: v0.4.3
  • My browser is: Chrome 56

Description

Returning false via the "onNext" does not prevent the wizard from continuing to the next item.

How can we reproduce this bug?


    var wizard = $("#exampleWizardForm").wizard({
      step: '.steps .step, .pearls .pearl',
      templates: {
        buttons: function buttons() {
          var options = this.options;
          return '<div class="panel-footer"><div class="wizard-buttons"><a class="btn btn-default btn-outline" href="#' + this.id + '" data-wizard="back" role="button">' + options.buttonLabels.back + '</a><a class="btn btn-primary btn-outline pull-xs-right" href="#' + this.id + '" data-wizard="next" role="button">' + options.buttonLabels.next + '</a><a class="btn btn-success btn-outline pull-xs-right" href="#' + this.id + '" data-wizard="finish" role="button">' + options.buttonLabels.finish + '</a></div></div>';
        }
      },
      classes: {
        button: {
          hide: 'hidden-xs-up',
          disabled: 'disabled'
        }
      },
      onNext: function(e) {
        return false;
      }
    });

What did you expect to happen?

The wizard should not have switched to the next section.

What happened instead?

The wizard went to the next section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions