Skip to content

Commit ff41f24

Browse files
committed
Trigger change event when suggestion is selected - fixes victorjonsson#394
1 parent 3996b62 commit ff41f24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@
695695
.click(function () {
696696
$input.focus();
697697
$input.val($(this).text());
698+
$input.trigger('change');
698699
onSelectSuggestion($input);
699700
});
700701
});
@@ -713,6 +714,7 @@
713714
if ($suggestionContainer.length > 0) {
714715
var newText = $suggestionContainer.find('div').eq($.formUtils._selectedSuggestion).text();
715716
$input.val(newText);
717+
$input.trigger('change');
716718
onSelectSuggestion($input);
717719
e.preventDefault();
718720
}

0 commit comments

Comments
 (0)