[fix] Bug in setting startOffset to tabs - using localStorage all the time#6080
[fix] Bug in setting startOffset to tabs - using localStorage all the time#6080roland-d merged 1 commit intojoomla:stagingfrom
Conversation
|
@test: So the patch works like expected regarding to the bug with 'useCookie', but the 'startOffset' seems to be ineffective when setting 'useCookie' to true. Maybe another bug? |
|
Thanks @Erftralle for testing. Yes, agree with you that when using This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6080. |
|
@test works as described. Before the patch, the chosen tab is not selected, after applying path the chosen tab is selected. |
[fix] Bug in setting startOffset to tabs - using localStorage all the time
To reproduce the issue
Do this before applyting patch
Add the following code in any joomla template file (for example:
<any-component>/views/tmpl/default.php)Ideally you should have open
Tab3as we have set offset to 2. Now, if you haveTab1as selected then selectTab2and simply refresh the page. We have disabled the broweser storage, it meansTab3should be selected. But it's not.Reason:
https://github.com/joomla/joomla-cms/blob/staging/media/system/js/tabs.js#L45 this line of code is expecting
booleanbut when you will check in cosole with code,it will show
stringand because of that condition in above file always becometrue.Test & Confirm fix
Apply this patch and confirm with enabling or disabling browser storage.