current tab on indivudual page is remembered by number, which is volatile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
webtrees |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When navigating through indivudual pages, webtrees tries to keep the visitor on the same tab of each, e.g. the interactive tree for each. This tab is remembered by setting a cookie, named 'indi-tab', which is the 0-based sequence number of that tab on the page where the tab label was last clicked (or selected otherwise). However, not all individuals have all tabs, e.g. the media and album tab are omitted when there are no media for the individual, and likewise for the sources and notes tabs. (Administrators may overlook how visitors experience this, because for administrators these tabs are not empty and omitted, but contain an option to add media, note, source). Hence the sequence numbers of the tabs change, and do not reflect the user's current tab.
An example can be seen on the webtrees demo, both 'current release' and 'latest beta', as follows:
- do not log in, just visit
- in the statistics bloc, select the first individual, Augustus the Younger, Duke of Brunswick-Lüneburg, and click his 'interactive tree' tab to activate it.
This had sequence number 5, and sets the 'indi-tab' cookie to 5
- now choose the spouse of his sun, Christine of Hesse-Eschwege. She has no media or album tab. For her individual page, the maximum tab sequence number is 4, the 'google maps' tab. Therefor tab activation defaults to 0, the 'facts and events' tab, instead of activating the 'interactive tree' tab , which for her individual page has sequence number 3
Solution:
Activate tabs based on an id in the tabs <li> element. An example of how to do this can be seen at
http://
To see the example, press ctrl-enter when that page is loaded, and look carefully: the example script actives the second tab, and after 500 ms activates the first tab.
description: | updated |
This broke when jQuery-UI changed the operation of tabs, around version 1.7 or 1.8.
Previously, tabs were named. After the change they were numbered.
There have been a few attempts to fix this, but all have introduced other problems.
A time delay will break on slow machines, and cause annoyance on fast ones.