diff options
author | Joseph Mirabel <jmirabel@laas.fr> | 2020-03-22 12:15:24 (GMT) |
---|---|---|
committer | Joseph Mirabel <jmirabel@laas.fr> | 2020-03-22 12:15:24 (GMT) |
commit | 2f66c80e7d59f2dd22036b17e77a48e547705d96 (patch) | |
tree | 22181a9ebfc58e66de9ddcae9921fefdab7728ca /src/searchindex.cpp | |
parent | 386bc490c931392778334772eee6a56778cd5ae1 (diff) | |
download | Doxygen-2f66c80e7d59f2dd22036b17e77a48e547705d96.zip Doxygen-2f66c80e7d59f2dd22036b17e77a48e547705d96.tar.gz Doxygen-2f66c80e7d59f2dd22036b17e77a48e547705d96.tar.bz2 |
Fix CROS javascript issue when giving focus to search result frame.
Diffstat (limited to 'src/searchindex.cpp')
-rw-r--r-- | src/searchindex.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 0296b93..0e3ef44 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -1007,6 +1007,12 @@ void writeJavaScriptSearchIndex() t << "document.getElementById(\"NoMatches\").style.display=\"none\";" << endl; t << "var searchResults = new SearchResults(\"searchResults\");" << endl; t << "searchResults.Search();" << endl; + t << "window.addEventListener(\"message\", function(event) {" << endl; + t << " if (event.data == \"take_focus\") {" << endl; + t << " var elem = searchResults.NavNext(0);" << endl; + t << " if (elem) elem.focus();" << endl; + t << " }" << endl; + t << "});" << endl; t << "/* @license-end */\n"; t << "--></script>" << endl; t << "</div>" << endl; // SRIndex |