Set focus to the search query input box when the Search pane is activated.

master
Pacman Ghost 3 years ago
parent fc6776ca29
commit 8e48d48d3a
  1. 6
      asl_rulebook2/webapp/static/SearchPane.js

@ -73,6 +73,12 @@ gMainApp.component( "search-box", {
gEventBus.emit( "search-for", gAppConfig.WEBAPP_INITIAL_QUERY_STRING ) ;
} ) ;
gEventBus.on( "tab-activated", (tabbedPages, tabId) => {
// set focus to the query string input box
if ( tabbedPages.tabbedPagesId == "nav" && tabId == "search" )
this.$refs.queryString.focus() ;
} ) ;
gEventBus.on( "search-done", (showSrCount) => {
// a search has been completed - update the search result count
this.showSrCount = showSrCount ;

Loading…
Cancel
Save