I have the following code to close a subtab from the "x" button next to the subtab title:
It's an event listener that triggers when the user closes the subtab using the "x" button. Everything works perfectly, but the only issue I have is when the confirm dialog box appears, if I click "Ok" the subtab closes but if I click "Cancel", the subtab still closes.
Is there anyway I can just cancel out of the action of closing the tab when I click on "Cancel"?
EDIT: Just realize that the code always run whenever you leave the subtab (from normal cancel link on the VF page or event a submit button - both exiting the subtab). Is there a way to specifically bind the confirm box to just the "x" button next to the subtab title, or is that not possible at all?