Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0daf562 authored by smain@google.com's avatar smain@google.com Committed by Android (Google) Code Review
Browse files

Merge "fix bug causing anchors to fail on preview landing page; exit the...

Merge "fix bug causing anchors to fail on preview landing page; exit the onhashchange listener if there's no searchbar on the page" into lmp-dev
parents 17e2c06e 2f077190
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2552,6 +2552,9 @@ function offsetScrollForSticky() {

// when an event on the browser history occurs (back, forward, load) requery hash and do search
$(window).hashchange( function(){
  // Ignore if there's no search bar (some special pages have no header)
  if ($("#search-container").length < 1) return;

  // If the hash isn't a search query or there's an error in the query,
  // then adjust the scroll position to account for sticky header, then exit.
  if ((location.hash.indexOf("q=") == -1) || (query == "undefined")) {