diff --git a/doc/all.css b/doc/all.css index b1d55cf25a..dd00d1adb0 100644 --- a/doc/all.css +++ b/doc/all.css @@ -96,7 +96,7 @@ h1#title { color: #999; } #search { - width: 100px; + width: 120px; margin-left: 0.5em; } #search.inactive { diff --git a/doc/godocs.js b/doc/godocs.js index 8b451547d6..2b3ab065ff 100644 --- a/doc/godocs.js +++ b/doc/godocs.js @@ -34,7 +34,18 @@ function godocs_bindSearchEvents() { search.className = ""; } } + function restoreInactive() { + if (search.value != "") { + return; + } + if (search.type != "search") { + search.value = search.getAttribute("placeholder"); + } + search.className = "inactive"; + } + restoreInactive(); bindEvent(search, 'focus', clearInactive); + bindEvent(search, 'blur', restoreInactive); } /* Generates a table of contents: looks for h2 and h3 elements and generates diff --git a/lib/godoc/godoc.html b/lib/godoc/godoc.html index f1d9c2ad9c..837f53c483 100644 --- a/lib/godoc/godoc.html +++ b/lib/godoc/godoc.html @@ -33,7 +33,7 @@ Packages | Commands | Specification - +