From: Christian Dywan Date: Tue, 13 Mar 2012 19:03:20 +0000 (+0100) Subject: Don't replace existing onclick/blur with autosuggest X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c9f219b7aa4fee00eef9f080e254b4c16ef7585;p=midori Don't replace existing onclick/blur with autosuggest --- diff --git a/data/autosuggestcontrol.js b/data/autosuggestcontrol.js index 85a506ab..389bfd47 100644 --- a/data/autosuggestcontrol.js +++ b/data/autosuggestcontrol.js @@ -186,10 +186,10 @@ AutoSuggestControl.prototype.init = function () { }; //assign onblur event handler (hides suggestions) - this.textbox.onblur = - this.textbox.onclick = function () { - oThis.hideSuggestions(); - }; + if (!this.textbox.onblur) + this.textbox.onblur = function () { oThis.hideSuggestions(); }; + if (!this.textbox.onclick) + this.textbox.onclick = function () { oThis.hideSuggestions(); }; //create the suggestions dropdown this.createDropDown(); @@ -299,7 +299,7 @@ function initSuggestions () { if (inputs.length == 0) return false; - for (i=0;i