Browse Source

feedtree.selectFeed: focus headlines-frame after selection

Andrew Dolgov 2 years ago
parent
commit
7590f03961
2 changed files with 6 additions and 1 deletions
  1. 1 1
      index.php
  2. 5 0
      js/FeedTree.js

+ 1 - 1
index.php

@@ -277,7 +277,7 @@
 
 		<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>

+ 5 - 0
js/FeedTree.js

@@ -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) {