We are seeing the active tab change after onBeforeUnload client side event (clicking cancel to prevent postback) then clicking to save (causing postback)
We are adding a client side event [window.onbeforeunload] to handle the user exiting before saving. This will prompt the user to [OK or Cancel to lose changes] when they click away when editing. Testing this if we click on another tab it will prompt us and then we cancel. So far this works correctly. We stay on the same screen and tab and are still in edit mode. But when I click save it will save but then the active tab changes, it gets highlighted. The tab switched to is the one we click to initiate the ok/cancel. So it is as if the active/tab was stored around the time onBeforeUnload fired, then changed when it posted back.
Events.
1. On tab Go into edit mode which assigns window.onbeforeunload event handler
2. Try to click into the second top level tab
3. we see the handler popup with ok/cancel to move and possible lose changes
4. click Cancel so don't move. Everything looks ok now.
5. Click save on the same page/tab which removes the event handler and posts back to save
6. We stay on the same page but the active tab changes to the second top level tab. We stay on the same page but its just the high-lighted tab that appears wrong.
I'm wondering if some radTabStrip events fire before window.OnBeforeUnload that save the active tab, even though we cancel (choose not to move) it will set that new tab on the next post back ?. Maybe there is a different event (prior to onBeforeUnload) that I must capture before the active-tab is changed.
On postback I may be able to check that the active tab matches the page and change the active tab but I'd prefer a cleaner solution.
We are adding a client side event [window.onbeforeunload] to handle the user exiting before saving. This will prompt the user to [OK or Cancel to lose changes] when they click away when editing. Testing this if we click on another tab it will prompt us and then we cancel. So far this works correctly. We stay on the same screen and tab and are still in edit mode. But when I click save it will save but then the active tab changes, it gets highlighted. The tab switched to is the one we click to initiate the ok/cancel. So it is as if the active/tab was stored around the time onBeforeUnload fired, then changed when it posted back.
Events.
1. On tab Go into edit mode which assigns window.onbeforeunload event handler
2. Try to click into the second top level tab
3. we see the handler popup with ok/cancel to move and possible lose changes
4. click Cancel so don't move. Everything looks ok now.
5. Click save on the same page/tab which removes the event handler and posts back to save
6. We stay on the same page but the active tab changes to the second top level tab. We stay on the same page but its just the high-lighted tab that appears wrong.
I'm wondering if some radTabStrip events fire before window.OnBeforeUnload that save the active tab, even though we cancel (choose not to move) it will set that new tab on the next post back ?. Maybe there is a different event (prior to onBeforeUnload) that I must capture before the active-tab is changed.
On postback I may be able to check that the active tab matches the page and change the active tab but I'd prefer a cleaner solution.