fix broken keyboard navigation

master
Andrew Dolgov 19 years ago
parent 280ee9a339
commit c3f348c2fa

@ -471,8 +471,10 @@
<a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category <a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category
<span id=\"FCATCTR-$cat_id\" <span id=\"FCATCTR-$cat_id\"
class=\"$catctr_class\">($cat_unread unread)</span></a></li>"; class=\"$catctr_class\">($cat_unread unread)</span></a></li>";
print "<li id=\"feedCatHolder\" class=\"$holder_class\">
<ul class=\"feedCatList\">"; // !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function
// -> keyboard navigation, etc.
print "<li id=\"feedCatHolder\" class=\"$holder_class\"><ul class=\"feedCatList\">";
} }
printFeedEntry($feed_id, $class, $feed, $unread, printFeedEntry($feed_id, $class, $feed, $unread,

@ -152,7 +152,7 @@ function cleanSelectedList(element) {
var child = content.childNodes[i]; var child = content.childNodes[i];
if (child.id == "feedCatHolder") { if (child.id == "feedCatHolder") {
var fcat = child.firstChild; var fcat = child.lastChild;
for (j = 0; j < fcat.childNodes.length; j++) { for (j = 0; j < fcat.childNodes.length; j++) {
var feed = fcat.childNodes[j]; var feed = fcat.childNodes[j];
feed.className = feed.className.replace("Selected", ""); feed.className = feed.className.replace("Selected", "");
@ -584,7 +584,7 @@ function getRelativeFeedId(list, id, direction) {
for (i = 0; i < list.childNodes.length; i++) { for (i = 0; i < list.childNodes.length; i++) {
var child = list.childNodes[i]; var child = list.childNodes[i];
if (child.id == "feedCatHolder") { if (child.id == "feedCatHolder") {
if (child.firstChild) { if (child.lastChild) {
var cr = getRelativeFeedId(child.firstChild, id, direction); var cr = getRelativeFeedId(child.firstChild, id, direction);
if (cr) return cr; if (cr) return cr;
} }

Loading…
Cancel
Save