]> git.wh0rd.org - tt-rss.git/commitdiff
feedtree.selectFeed: focus headlines-frame after selection
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 12 May 2017 05:05:35 +0000 (08:05 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 12 May 2017 05:05:35 +0000 (08:05 +0300)
index.php
js/FeedTree.js

index e4cad9d00112baabb2ac57b66044e9dbf0c51935..15832aaabdca1c734b3bc20e0aeddba0e9b2a0d0 100644 (file)
--- a/index.php
+++ b/index.php
 
                <div id="floatingTitle" style="visibility : hidden"></div>
 
-               <div id="headlines-frame" dojoType="dijit.layout.ContentPane"
+               <div id="headlines-frame" dojoType="dijit.layout.ContentPane" tabindex="0"
                                onscroll="headlines_scroll_handler(this)" region="center">
                        <div id="headlinesInnerContainer">
                                <div class="whiteBox"><?php echo __('Loading, please wait...') ?></div>
index 84970099202a0b32a42976dc3e16e25a250b924c..63fa308f02f64c4c70f80fa1de39aab98a597477 100644 (file)
@@ -357,6 +357,11 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
                                if (!is_cat) this._expandNode(treeNode);
                                this.set("selectedNodes", [treeNode]);
                                this.focusNode(treeNode);
+
+                               // focus headlines to route key events there
+                               setTimeout(function() {
+                                       $("headlines-frame").focus();
+                               }, 0);
                        }
                },
                setFeedIcon: function(feed, is_cat, src) {