From 880d215a9fbafec25f7d6172b22e8dd0915a0c9a Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Thu, 26 May 2011 18:42:10 +0200 Subject: [PATCH] SONAR-1688 Search box does not allow mouse clicks to select the item. Had to comment 1 line in scriptaculous.js file. --- sonar-server/src/main/webapp/javascripts/scriptaculous.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/javascripts/scriptaculous.js b/sonar-server/src/main/webapp/javascripts/scriptaculous.js index b5d327f416c..e291e44f222 100644 --- a/sonar-server/src/main/webapp/javascripts/scriptaculous.js +++ b/sonar-server/src/main/webapp/javascripts/scriptaculous.js @@ -1506,10 +1506,10 @@ Autocompleter.Base = Class.create({ var value = ''; if (this.options.select) { var nodes = $(selectedElement).select('.' + this.options.select) || []; - if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); + if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); } else value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); - + var bounds = this.getTokenBounds(); if (bounds[0] != -1) { var newValue = this.element.value.substr(0, bounds[0]); @@ -1521,7 +1521,9 @@ Autocompleter.Base = Class.create({ this.element.value = value; } this.oldElementValue = this.element.value; - this.element.focus(); + // Following line was commented for SONAR-1688 because in our autosuggest text fields, we use + // the onfocus() method to reinitialize the value of the input field to ''. + //this.element.focus(); if (this.options.afterUpdateElement) this.options.afterUpdateElement(this.element, selectedElement); -- 2.39.5