Skip to content

Commit

Permalink
Move from scrollTo to ScrollToE to prevent hitting window.scrollTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrishotts committed Mar 12, 2012
1 parent 64803f7 commit 1b233f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
12 changes: 6 additions & 6 deletions www/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var forceParsings = argsParsed["forcep"];
var maxPages = 1;
var maxResults = 0;
var scrollTo = argsParsed["scrollto"];
var scrollToE = argsParsed["scrollto"];
if (!curPage)
{
curPage = 1;
Expand All @@ -37,9 +37,9 @@
greekWord = "";
}

if (!scrollTo)
if (!scrollToE)
{
scrollTo = "";
scrollToE = "";
}

// console.log ("on search page. args:" + englishWord + ", " + greekWord + ", " + curPage);
Expand Down Expand Up @@ -184,10 +184,10 @@
hideLoader();
resetContentScrollBar(0);
setTimeout (function() {
if (scrollTo)
if (scrollToE)
{
scrollBodyToElement ($(scrollTo),0);
scrollTo = null;
scrollBodyToElement ($(scrollToE),0);
scrollToE = null;
}
else
{
Expand Down
18 changes: 11 additions & 7 deletions www/strongs.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

var englishWord = argsParsed["search"]; // incoming search
var curPage = argsParsed["page"];
var scrollTo = argsParsed["scrollto"];
var scrollToE = argsParsed["scrollto"];
var maxPages = 1;
var maxResults = 0;
if (!curPage)
Expand All @@ -25,9 +25,9 @@
englishWord = "";
}

if (!scrollTo)
if (!scrollToE)
{
scrollTo = "";
scrollToE = "";
}

// console.log ("on strong's page. args:" + englishWord + ", " + curPage);
Expand Down Expand Up @@ -163,18 +163,22 @@
{
resetContentScrollBar(0);
setTimeout (function() {
if (scrollTo)
if (scrollToE)
{
scrollBodyToElement ($(scrollTo),0);
scrollTo = null;
scrollBodyToElement ($(scrollToE),0);
scrollToE = null;
}
},125);
hideLoader();
}

onPageBeforeShow = function ()
{
showSearch( doSearchStrongs ); // search us instead
}

function searchStart()
{
showSearch( doSearchStrongs ); // search us instead
setPageTitle ("Strong's Lookup");
if (englishWord) { showLoader (0, "Searching..."); }
delayThis ( 30, function() {
Expand Down

0 comments on commit 1b233f1

Please sign in to comment.