Using either session cookies or coming to the site for
the first time will make the menu not show the
expansion states correctly. Only the first item is
interpreted correctly. The offending code is this:
in MDisplayItem
if(MTMUA.cookieEnabled) {
if(MTMFirstRun && MTMCookieString != "") {
item.expanded =
(MTMCookieString.charAt(MTMCookieCharNum++) == "1") ?
true : false;
} else {
MTMCookieString += (item.expanded) ? "1" : "0";
}
}
First item sets MTMCookieString, and subsequently all
following items get their expansion state set to
"false". Not good!
Bugfix will come when all intializing is moved to own
functions (one for DOM-browsers, one for others), then
having one function traverse the tree and set the
expansion-status according to the cookie.
Logged In: YES
user_id=141897
Remember to add default behaviour of overriding cookie if
makeSubmenu()'s second argument is set to true, or make it
configurable.
Logged In: YES
user_id=141897
Credits to Jean-Nol (johnxmas) for reporting the bug.
Logged In: YES
user_id=141897
MTMDisplayMenu() doesn't set the cookie when MTMFirstrun is
true, which it really should. Thought behind current
behaviour may be that it wasn't necessary to write it first
time around, but it really is. As it is, user can visit,
not change anything, and end up having the cookie expire.