User tests: Successful: Unsuccessful:
Pull Request for Issue # .
The problem: Many people stated that they experience odd behaviour with the tabs when a page loads (admin area).
The javascript that controlled this behaviour was way to liberal.
So the old behaviour:
The new logic:
&id=0000 part (could be improved, help is welcome)Apply the patch and try any view with tabs
None
| Status | New | ⇒ | Pending | 
| Labels | Added: 
? | ||
| Category | ⇒ | JavaScript | 
 
                 
                I have tested this item 
| Milestone | Added: | ||
 
                I have tested this item 
much better 
| Milestone | Removed: | ||
| Status | Pending | ⇒ | Ready to Commit | 
 
                RTC
| Status | Ready to Commit | ⇒ | Pending | 
| Labels | Added: 
? | ||
| Labels | Removed: 
? | ||
 
                | Labels | Added: 
? Removed: ? | ||
 
                What is the status here? Just re testing?
 
                remove the parameter return too
What do you mean? give me an example
 
                You used regular expression to remove &myStrangeId=0000
In the localStorage I found /j364/administrator/index.php?option=com_config&view=component&component=com_patchtester&path=&return=aHR0cDovL2xvY2FsaG9zdC9qMzY0L2FkbWluaXN0cmF0b3IvaW5kZXgucGhwP29wdGlvbj1jb21fcGF0Y2h0ZXN0ZXI%3D
I'd add .replace(/&return=[a-zA-Z0-9%]+$/, '') to remove the parameter return
 
                I don't think so. The regular expression ends with $, so you process only the last parameter. If you put &view=component at the end of the url it doesn't work anymore. Your regex removes the parameter view.
Please try with .replace(/&[a-zA-Z]+=\d+/, '').replace(/&return=[a-zA-Z0-9%]+/, '')
 
                That's ok, but if you use the $ at the end of the regular expression you process only the last parameter. /&[a-zA-Z-_]+=[0-9]+$/ doesn't work with
index.php?option=com_mycomponent&myparam=123&view=myview
 
                @eshiol following the core paradigm all components for their singular view have the id as the last param. Now 3rd PD may not follow that (?) but if I remove that then a url like
index.php?option=com_dfdsadfad&view=component&catid=33&mynice_id=2342 will eliminate both id and catId, which might not be what we want?
Anyways I am gonna remove it and if it misbehave then we can rework the regex
 
                of course, you are right.
But, what the difference between 
index.php?option=com_dfdsadfad&view=component&catid=33&mynice_id=2342
index.php?option=com_dfdsadfad&view=component&catid=33&mynice_id=5555
index.php?option=com_dfdsadfad&view=component&catid=34&mynice_id=8888
I'd like to open the same tab in all of the three cases. But I agree with you, this kind of filter is more complex than it seems
 
                But, what the difference between
Probably the same view and the same tabs, unless some ACL removes access to some tabs and then no tab will be selected )or something like that)
 
                I have tested this item 
again
 
                I have tested this item 
| Status | Pending | ⇒ | Ready to Commit | 
 
                RTC
| Milestone | Added: | ||
| Labels | Added: 
? | ||
| Status | Ready to Commit | ⇒ | Fixed in Code Base | 
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-04 09:06:06 | 
| Closed_By | ⇒ | rdeutz | 
Testes dwith success (cannot mark it on the tracker)
Animated gif of the problem and the success test
