Tbwizard And Submit Button In Modal

Hello! I have a TbWizard in a modal and a submit button. The behavior should be when I click the submit button, it should go to the next tab and should stay in the modal. But when I do that, it goes to the next tab but it is not in the modal anymore. Thank you!