diff --git a/javascript/TreeDropdownField.js b/javascript/TreeDropdownField.js
index 32453695e..21d691fe3 100644
--- a/javascript/TreeDropdownField.js
+++ b/javascript/TreeDropdownField.js
@@ -47,13 +47,15 @@
// XMLHttpRequest
CurrentXhr: null,
- onmatch: function() {
+ onadd: function() {
this.append(
'' +
'
' +
''
);
+ },
+ onmatch: function() {
var linkTitle = strings.openLink;
if(linkTitle) this.find("treedropdownfield-toggle-panel-link a").attr('title', linkTitle);
if(this.data('title')) this.setTitle(this.data('title'));
@@ -334,7 +336,7 @@
});
$('.TreeDropdownField.searchable').entwine({
- onmatch: function() {
+ onadd: function() {
this._super();
var title = ss.i18n._t('TreeDropdownField.ENTERTOSEARCH');
this.find('.treedropdownfield-panel').prepend(