jquery-smartwizard icon indicating copy to clipboard operation
jquery-smartwizard copied to clipboard

History back on step1 sucks

Open visualight opened this issue 3 years ago • 0 comments

Describe the bug Cannot history back() on step 1 when anchor navigation is enabled

To Reproduce

  1. Enable default smartWizard configuration with enableNavigation = true.
  2. Click button next 3 times to nav to other tab-pane.
  3. Click the previous navigation button of the browser (history back()).
  4. All step work with the history back button of the browser except step 1.

FIX

  1. Edit jquery.smartWizard.js

  2. Goto method : _setEvents

  3. Locate the verification below if(idx && _this3._isShowable(_this3.steps.eq(idx))) {...}

  4. Replace with : if(idx !== undefined && _this3._isShowable(_this3.steps.eq(idx))) {...}

In fact, idx return a zero (0) value for step 1 ... so you cannot simply verify idx as a boolean value (0 - null is false). idx !== undefined // verify if value is defined

visualight avatar Aug 24 '22 06:08 visualight