diff --git a/docs/javascript/main.js b/docs/javascript/main.js index e0376295..3cd85971 100644 --- a/docs/javascript/main.js +++ b/docs/javascript/main.js @@ -173,9 +173,9 @@ function ShowTip(event, tooltipID, linkID) var docX = event.clientX + window.pageXOffset; var docY = event.clientY + window.pageYOffset; - var showCommand = "ReallyShowTip('" + tooltipID + "', '" + linkID + "', " + docX + ", " + docY + ")"; - - tooltipTimer = setTimeout(showCommand, 1000); + tooltipTimer = setTimeout(function () { + ReallyShowTip(tooltipID, linkID, docX, docY); + }, 1000); } function ReallyShowTip(tooltipID, linkID, docX, docY) @@ -285,7 +285,7 @@ function NDOnResize() { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(NDDoResize, 250); - }; + } function NDDoResize() @@ -448,6 +448,7 @@ function SearchPanel(name, mode, resultsPath) */ this.OnSearchFieldChange = function() { + var t = this; if (this.keyTimeout) { clearTimeout(this.keyTimeout); @@ -460,7 +461,9 @@ function SearchPanel(name, mode, resultsPath) { if (searchValue != "") { - this.keyTimeout = setTimeout(this.name + ".Search()", this.keyTimeoutLength); + this.keyTimeout = setTimeout(function () { + t.name.Search(); + }, this.keyTimeoutLength); } else { @@ -624,6 +627,7 @@ function SearchPanel(name, mode, resultsPath) */ this.Activate = function(isActive, ignoreDeactivateDelay) { + var t = this; // We want to ignore isActive being false while the results window is open. if (isActive || (this.mode == "HTML" && this.DOMPopupSearchResultsWindow().style.display == "block")) { @@ -642,7 +646,9 @@ function SearchPanel(name, mode, resultsPath) } else if (!ignoreDeactivateDelay) { - this.inactivateTimeout = setTimeout(this.name + ".InactivateAfterTimeout()", this.inactivateTimeoutLength); + this.inactivateTimeout = setTimeout(function () { + t.name.InactivateAfterTimeout(); + }, this.inactivateTimeoutLength); } else {