From 2c9f219b7aa4fee00eef9f080e254b4c16ef7585 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 13 Mar 2012 20:03:20 +0100 Subject: [PATCH] Don't replace existing onclick/blur with autosuggest --- data/autosuggestcontrol.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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