Browse Source

Fix missing preventDefault() when backspacing tags

merge-requests/68/head
Deimos 6 years ago
parent
commit
810634e073
  1. 1
      tildes/static/js/behaviors/autocomplete-input.js

1
tildes/static/js/behaviors/autocomplete-input.js

@ -99,6 +99,7 @@ $.onmount('[data-js-autocomplete-input]', function() {
break; break;
case 'Backspace': case 'Backspace':
if ($(this).val() === '') { if ($(this).val() === '') {
event.preventDefault();
var $autocompleteContainer = $(this).parents('[data-js-autocomplete-container]').first(); var $autocompleteContainer = $(this).parents('[data-js-autocomplete-container]').first();
var $chips = $autocompleteContainer.find('[data-js-autocomplete-chips]').first(); var $chips = $autocompleteContainer.find('[data-js-autocomplete-chips]').first();
var $tagsHiddenInput = $("[data-js-autocomplete-hidden-input]"); var $tagsHiddenInput = $("[data-js-autocomplete-hidden-input]");

Loading…
Cancel
Save