diff --git a/src/opnsense/www/js/jquery.tokenize.js b/src/opnsense/www/js/jquery.tokenize.js index 8730d8ed6..e0a681a9e 100644 --- a/src/opnsense/www/js/jquery.tokenize.js +++ b/src/opnsense/www/js/jquery.tokenize.js @@ -154,8 +154,9 @@ this.searchInput.on('blur', function(){ if($this.searchInput.val()){ - if ($('li.Hover', this.dropdown).length > 0) { - $this.tokenAdd($('li.Hover', this.dropdown).data('text')); + hover_selection = $('li.Hover', this.dropdown); + if (hover_selection.length > 0) { + $this.tokenAdd(hover_selection.attr('data-value'), hover_selection.attr('data-text')); } else { $this.tokenAdd($this.searchInput.val(), ''); }