From 37d787fc4278d60eb357ef0b4972be916ca3264e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 3 Feb 2016 10:54:52 +0100 Subject: [PATCH] Do not open/close widget on render result. --- .../javascripts/app/lib/base/jquery.textmodule.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/assets/javascripts/app/lib/base/jquery.textmodule.js b/app/assets/javascripts/app/lib/base/jquery.textmodule.js index 21ea38609..0165f988a 100644 --- a/app/assets/javascripts/app/lib/base/jquery.textmodule.js +++ b/app/assets/javascripts/app/lib/base/jquery.textmodule.js @@ -367,14 +367,6 @@ this.$widget.find('ul').html('') this.log('result', term, result) - if (!result[0]) { - result = [{id:'', name: '-'}] - } - - if (!this.active) { - this.open() - } - var elements = $() for (var i = 0; i < result.length; i++) { @@ -383,7 +375,7 @@ element.attr('data-id', item.id) element.text(App.Utils.htmlEscape(item.name)) element.addClass('u-clickable u-textTruncate') - if (i == result.length-1 && item.id != '') { + if (i == result.length-1) { element.addClass('is-active') } if (item.keywords) {