diff options
author | smain@google.com <smain@google.com> | 2014-10-17 05:18:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-17 05:18:08 +0000 |
commit | 19c6780f9fc4994c0909afa900e59b9282a0d253 (patch) | |
tree | 518011c78a6bb06ecc5cc3afd6edcbbf69c1059e /tools | |
parent | e0471a82276d86c671a9e2a21f58eb140cb94dc0 (diff) | |
parent | 11fc009469059aeafad1fea37fd4a3eb1a47dec9 (diff) | |
download | build-19c6780f9fc4994c0909afa900e59b9282a0d253.zip build-19c6780f9fc4994c0909afa900e59b9282a0d253.tar.gz build-19c6780f9fc4994c0909afa900e59b9282a0d253.tar.bz2 |
Merge "fix scroll offset when loading non-header pages" into lmp-dev
Diffstat (limited to 'tools')
-rw-r--r-- | tools/droiddoc/templates-sdk/assets/js/docs.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index 3d278c3..a556f4f 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -2538,6 +2538,9 @@ google.setOnLoadCallback(function(){ /* Adjust the scroll position to account for sticky header, only if the hash matches an id. This does not handle <a name=""> tags. Some CSS fixes those, but only for reference docs. */ function offsetScrollForSticky() { + // Ignore if there's no search bar (some special pages have no header) + if ($("#search-container").length < 1) return; + var hash = escape(location.hash.substr(1)); var $matchingElement = $("#"+hash); // Sanity check that there's an element with that ID on the page |