title: Select2 not filtered when search text is entered
body: <p>I have upgraded select2 into version 4. When I open select2 and enter the search text, the list filters based on what I type.</p>
  
  <p>Here is the HTML</p>
  
  <pre><code>&lt;select style="width: 100%;" id="fruit" multiple required&gt;
       &lt;option value="1"&gt;Apple&lt;/option&gt;
       &lt;option value="2"&gt;Pear&lt;/option&gt;
       &lt;option value="3"&gt;Watermelon&lt;/option&gt;
       &lt;option value="4"&gt;Melon&lt;/option&gt;
       &lt;option value="5"&gt;Pineapple&lt;/option&gt;
       &lt;option value="6"&gt;Orange&lt;/option&gt;
       &lt;option value="7"&gt;Kiwi&lt;/option&gt;
       &lt;option value="8"&gt;Banana&lt;/option&gt;
       &lt;option value="9"&gt;Papaya&lt;/option&gt;
       &lt;option value="10"&gt;Tangerine&lt;/option&gt;
   &lt;/select&gt;
  </code></pre>
  
  <p>This is for JS</p>
  
  <pre><code>$(document).on('ready', function() {
      function matchCustom(params, data) {
          if ($.trim(params.term) === '') {
            return data;
          }
          if (typeof data.text === 'undefined') {
            return null;
          }
          var terms = params.term.split(" ");
          for (var i=0; i &lt; terms.length; i++){
              if (data.text.toLowerCase().indexOf(terms[i].toLowerCase()) === -1) {
                  return null;
              }
          }
          return data;
      }
      $('select').select2({
          matcher: matchCustom,
          closeOnSelect: false,
          multiple: true
      });
      var last_search = '';
      $('select').on('select2:open', function () {
          if (last_search != "") {
              $('#fruit').select2('search', last_search);
              $('.select2-search__field').val(last_search);
          }
      });
      $(document).on('keyup', '.select2-search__field', function () {
          var text = $('.select2-search__field').val();
          last_search = text;
      });
  });
  </code></pre>
  
  <p>Initial display</p>
  
  <p><a href="https://i.stack.imgur.com/rdjnA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rdjnA.png" alt="initial display"></a></p>
  
  <p>When I type, this is the design</p>
  
  <p><a href="https://i.stack.imgur.com/xM2zW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xM2zW.png" alt="search"></a></p>
  
  <p>After I selected what I want, the list is still open and the search text is not disappear. It's not a problem. However, when I click on another place (which caused my select2 list to disappear) and click again at the select2 field, this is what happened.</p>
  
  <p><a href="https://i.stack.imgur.com/MLAVC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MLAVC.png" alt="image1"></a></p>
  
  <p>The last search value is "ap". The list only included the value that have "ap" in the words. But, the Searching text is exist. The "ap" value doesn't appear in the search text as expected. This code <code>$('.select2-search__field').val(last_search);</code> doesn't work as expected.</p>
  
  <p>I also try to remove this code <code>$('#fruit').select2('search', last_search);</code> that is located inside the select2 open event. I got another problem when I opened select2 field for the second time.</p>
  
  <p><a href="https://i.stack.imgur.com/qnh4e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qnh4e.png" alt="image2"></a></p>
  
  <p>The "ap" value is the last search before I close the select2 list. When I reopened, the "ap" value shows up in the search text which is correct. But, the list is not filtered according to what I search.</p>
  
  <p>The outcome that I want after I reopened select2 field is the search value appears <strong>and</strong> the list only filters what I search. I have been searching for this for hours. Is there anything that I am missing?</p>