<div class="pagination">
<span class="step-links">
  {% if list.has_previous %}
      <a href="?filter={{ filter }}&sort={{ sort }}&page={{ list.previous_page_number }}">&lt; previous</a>
  {% endif %}

  <span class="current">
    Page
    <input type="number" id="page-number" value="{{ list.number }}"
           max="{{ list.paginator.num_pages }}" min="1" step="1" size="3"
           data-sort="{{ sort }}">
     of {{ list.paginator.num_pages }}.
  </span>

  {% if list.has_next %}
      <a href="?filter={{ filter }}&sort={{ sort }}&page={{ list.next_page_number }}">next &gt;</a>
  {% endif %}
</span>
</div>

<script>
  $(document).ready(function (){
    $('#page-number').change(function (event) {
      var $this = $(this);
      var sort = $this.data('sort');
      var filter = $this.data('filter');
      var max = $this.attr('max');
      var min = $this.attr('min');
      if ($this.val() >= min && $this.val() <= max
          && $this.attr('value') != $this.val()) {
        window.location = '?filter=' + filter + '&sort=' + sort + '&page=' + $this.val();
      }
    });
  });
  
</script>
<div class="pagination">
<span class="step-links">
  {% if list.has_previous %}
      <a href="?filter={{ filter }}&sort={{ sort }}&page={{ list.previous_page_number }}">&lt; previous</a>
  {% endif %}

  <span class="current">
    Page
    <input type="number" id="page-number" value="{{ list.number }}"
           max="{{ list.paginator.num_pages }}" min="1" step="1" size="3"
           data-filter="{{ filter }}"
           data-sort="{{ sort }}">
     of {{ list.paginator.num_pages }}.
  </span>

  {% if list.has_next %}
      <a href="?filter={{ filter }}&sort={{ sort }}&page={{ list.next_page_number }}">next &gt;</a>
  {% endif %}
</span>
</div>

<script>
  $(document).ready(function (){
    $('#page-number').change(function (event) {
      var $this = $(this);
      var sort = $this.data('sort');
      var filter = $this.data('filter');
      var max = $this.attr('max');
      var min = $this.attr('min');
      if ($this.val() >= min && $this.val() <= max
          && $this.attr('value') != $this.val()) {
        window.location = '?filter=' + filter + '&sort=' + sort + '&page=' + $this.val();
      }
    });
  });
  
</script>
Fix page jumping lost args
Fix page jumping lost args
