I ran some further JavaScript diagnostics and believe I have identified the cause of this issue.
Before opening the customer record, the main TabStrip reported:
ID: AW_TABSTRIP_main
Selected tab: Customers
After Save and Close:
ID: AW_TABSTRIP_main
Selected tab: Dashboard
sameElement: false
sameWidget: false
Although the TabStrip retains the same ID, both the DOM element and Kendo widget instance are replaced. This confirms that AwareIM reconstructs the main Visual Perspective TabStrip when the form closes. The newly created widget then selects its first tab.
I also found the following function in aware.js:
selectActiveTab:function(c,b){
var d=$("#"+c).data("kendoTabStrip");
d.select(0);
return d
}
This is the selectActiveTab() method of AwareApp_VPParser.
The unconditional d.select(0) explains why the first Visual Perspective tab becomes active whenever AW_TABSTRIP_main is reconstructed.
As a test, I temporarily overrode this method in the browser to remember the selected main tab by name and restore it after the replacement TabStrip was initialized. The console reported:
Remembering main tab: Customers
Restoring reconstructed tab: Customers
Customers then remained active after Save and Close, confirming both the cause and the feasibility of restoring the originating tab.
Could AwareIM retain the originating main Visual Perspective tab before rebuilding the TabStrip and restore it after the new widget is initialized?
Suggested behaviour:
- Record the active non-closable main tab before displaying a form or opening a temporary tab.
- Recreate the main TabStrip as currently required.
- Locate and select the originating tab after initialization.
- Fall back to select(0) only when no previous tab was recorded or that tab is no longer available.
- When a temporary edit tab is closed, return to its originating main tab rather than the first tab or an unrelated previously selected tab.
AwareIM already maintains m_curTabIdx and m_prevTabIdx, but selectActiveTab() currently ignores the retained tab state and always selects index 0.
As a minimal fix, selectActiveTab() could use the retained current-tab index for the main frame. However, indexes may change when tabs are conditionally displayed, reordered or temporarily added.
A more robust permanent solution would retain the last active non-closable page tab using a stable page-tab identifier:
Record originating fixed tab
↓
Rebuild Visual Perspective
↓
Find tab using stable identifier
↓
Restore that tab
↓
Use index 0 only as a fallback
This appears to be an AwareIM Visual Perspective lifecycle issue rather than a Kendo UI configuration or styling issue.