Problem with tabs

Hi,

I have a problem in using tabs.
I have three tabs(tab1,tab2,tab3).My requirement is if any changes done by the user in any tab and switches to other tab then a popup should come “changes are done , please save it ok or cancel”.

If user clicks ok then it will check the mandatory fields are empty are not, if any field is empty then alert the user “XYZ fields is Mandatory” and will be on the same tab(Tab where changes are done).

This behaviour is working fine if Iam on the same Tabs window. If I switch to any other browser/window/application by using alt+Tab key or minimize the browser in which my application is running then when i come back to the same tabs page then again it showing a popup saying “changes are done , please save it ok or cancel”(i.e again the tab selection procedure is done).If ok is selected then it will go to the tab where the user done changes.

Problem : The popup “changes are done , please save it ok or cancel” is showing twice if i navigate to other browser and come back.One thing i noted here is that if i do click on any place in the page(Tabs page)(i.e when curosr/control is not on the TAB) and navigate to other browserand come back then the popup is not getting invoked for second time.

If i use the same tabs page (without navigating to any browser) then popup will be getting once.

Using Tabset I created three tabs(tab1,tab2,tab3).
if user selects any tab then within the tabset Iam calling
Sample Code for using tabsets.
isc.TabSet.create({
ID: “topTabSet”,position:“relative”,
tabSelected: function(tabNum, tabPane, ID, tab)
{
if (ID && ID == “tab1”) {
}
if (ID && ID == “tab2”) {
}
if (ID && ID == “tab3”) {
}
},
tabs: [
{ID:“tab1”,
title: “AcctTAB”
},
{ID:“tab2”,
title: “AGGTAB”
},
{ID:“tab3”,
title: “GENTAB”
}
]
});

Note : I have doubt that once user done changes in one tab(tab1) and navigate to the other tab(tab2) then Iam sending the user back to the previous window using topTabSet.selectTab(“tab1”). If i switch to other window and come back to tabs window then again tab2 is getting loaded and showing popup and then to tab1.

Iam not understanding why again the tab2 is getting loaded after invoking alt+tab key (navigating to other window).

Please let me know how to solve this issue.

Thanks in Advance.

problem with tabs

Hi Isomorphic,

I have a doubt that its a focus issue.
I am attaching a small peace of code which demonstrat the problem which Iam facing now.

Please follow the steps once you run the code.

  1. once code is run, two tabs will be shown (default tab1(Account tab) will be get selected).

  2. click on “>” or “>>” arrow button( just think a change is done) and move to Aggregate tab. Then a popup will get displayed showing alert “You have not saved your changes.would you like to save them now” with OK and Cancel button.

  3. Click OK button then again a popup will shown as “Selected Accounts are mandatory”. now click on ok then it navigates back to tab1 (where changes are done ) (To navigate back I used topTabSet.selectTab(“tab1”))

4)Now press alt+tab keys or minimize the window then again come back to the same tab window.

Then it again asks you to save the changes as of previous. (which should not get happen).

Note : If you click on any where in the screen and then press the alt+tab key / minimize window

then second time alert will not displayed.

Here I have a doubt about the statement I am using topTabSet.selectTab(“tab1”).Is this creates any focus problem, because user already selected tab2 then Iam forcing the tabset to select tab1 using topTabSet.selectTab(“tab1”).

Please tell me its correct or wrong what iam doing. If its wrong then tell me how to acheive my requirement.

Thanks in advance.

TestTabs.txt (5 KB)

Hi Khajavali,
This is indeed a focus issue, and one which has been resolved since 6.5.1

The bug is already resolved in 7.0 RC2 (available in the releases section of our site), or if you are able to wait for 7.0 final (due out in the next couple of weeks) you should see this bug go away.

Alternatively, let us know if you need a patch against the 6.5.1 build and we can put one together

Thanks
Isomorphic Software