summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsmain@google.com <smain@google.com>2014-10-07 22:23:35 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-07 22:23:35 +0000
commit783d016a27ea342ad6445720026a14e89ae1c78c (patch)
tree2a39397b33f05a97c4e065dd4f62059f28910167 /tools
parent4247c940d45318f5553138fd37f13f85f2854c6a (diff)
parentbc667f1cd7d852909a9a3893473f29dc7b000b2f (diff)
downloadbuild-783d016a27ea342ad6445720026a14e89ae1c78c.zip
build-783d016a27ea342ad6445720026a14e89ae1c78c.tar.gz
build-783d016a27ea342ad6445720026a14e89ae1c78c.tar.bz2
am bc667f1c: am 08f336ea: fix regression from Change-Id: I88c1e8192f1cbb5373af592b9e9f9a04ffe6fc7c that causes anchors in most docs other than reference to stop working
* commit 'bc667f1cd7d852909a9a3893473f29dc7b000b2f': fix regression from Change-Id: I88c1e8192f1cbb5373af592b9e9f9a04ffe6fc7c that causes anchors in most docs other than reference to stop working
Diffstat (limited to 'tools')
-rw-r--r--tools/droiddoc/templates-sdk/assets/js/docs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index a9887d0..2824a3d 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -2540,8 +2540,8 @@ google.setOnLoadCallback(function(){
function offsetScrollForSticky() {
var hash = escape(location.hash.substr(1));
var $matchingElement = $("#"+hash);
- // Sanity check that hash is a real hash and that there's an element with that ID on the page
- if ((hash.indexOf("#") == 0) && $matchingElement.length) {
+ // Sanity check that there's an element with that ID on the page
+ if ($matchingElement.length) {
// If the position of the target element is near the top of the page (<20px, where we expect it
// to be because we need to move it down 60px to become in view), then move it down 60px
if (Math.abs($matchingElement.offset().top - $(window).scrollTop()) < 20) {