From dee48af9b18a0cebe1dd9a7e3b02e7a45648e1aa Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 16 May 2018 17:21:07 +0200 Subject: [PATCH] ui: text and value for #2381 --- src/opnsense/www/js/jquery.tokenize.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(), ''); }