]> git.wh0rd.org - tt-rss.git/commitdiff
fix broken keyboard navigation
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 13 Dec 2005 09:36:27 +0000 (10:36 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 13 Dec 2005 09:36:27 +0000 (10:36 +0100)
backend.php
functions.js

index f7c4e0d4ef5fa2ad360fbcc94c3c33855bcad713..7df13c0aeb057cff283328d40e5b7d3ee0a555ea 100644 (file)
                                                <a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category
                                                        <span id=\"FCATCTR-$cat_id\" 
                                                        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, 
index a77854827417337253926da46adbc990e8a0716c..8f18f4c47641663f5502182d47107f0c9d0bb8d9 100644 (file)
@@ -152,7 +152,7 @@ function cleanSelectedList(element) {
                        var child = content.childNodes[i];
 
                        if (child.id == "feedCatHolder") {
-                               var fcat = child.firstChild;
+                               var fcat = child.lastChild;
                                for (j = 0; j < fcat.childNodes.length; j++) {
                                        var feed = fcat.childNodes[j];
                                        feed.className = feed.className.replace("Selected", "");
@@ -584,7 +584,7 @@ function getRelativeFeedId(list, id, direction) {
                        for (i = 0; i < list.childNodes.length; i++) {
                                var child = list.childNodes[i];
                                if (child.id == "feedCatHolder") {
-                                       if (child.firstChild) {
+                                       if (child.lastChild) {
                                                var cr = getRelativeFeedId(child.firstChild, id, direction);
                                                if (cr) return cr;                                      
                                        }