changePage () loads and returns to the previous page

changePage () loads and returns to the previous page

Greetings.
 
I am developing an application for the loading of articles for an invoice, and I have been using changePage () without problems usually a series of inputs are initialized and selects with javascript / JQuery. but when you search for an article and load a datatable it shows me the resulting page with the datatable loaded and returns me. Next I show the used code.

Custom toolbar element within the datatable:

  1. <div data-role="controlgroup" data-type="horizontal" data-mini="true">
  2.    <button type="button" id="btn-buscar"><i class="fas fa-search"></i></button>
  3.    <input id="wkarticulo_buscar" name="wkarticulo_buscar" type="text" data-wrapper-class="controlgroup-textinput ui-btn" placeholder="Articulo" />
  4.    <a id="AbreQR" href="#LeerCodigoQR" data-rel="popup" data-position-to="window" data-transition="slidedown" class="ui-btn ui-corner-all">
  5.       <i class="fas fa-qrcode"></i>
  6.    </a>
  7. </div>
JavaScript / JQuery:

  1. $("#btn-buscar").on("click", function () {
  2.    var buscar = $("#wkarticulo_buscar").val();

  3.    if (buscar) {
  4.       BuscaArticulo(buscar); // Load datatable

  5.       $.mobile.changePage("./#ListaArticulos", {
  6.          transition: "slidedown",
  7.          changeHash: true
  8.       });
  9.    };
  10. });

  11. $("#wkarticulo_buscar").keypress(function (e) {
  12.    if (e.which == 13) {
  13.       var buscar = $("#wkarticulo_buscar").val();
  14.       if (buscar) {
  15.          BuscaArticulo(buscar);  // Load datatable

  16.          $.mobile.changePage("./#ListaArticulos", {
  17.             transition: "slidedown",
  18.             changeHash: true
  19.          });
  20.       };
  21.    };
  22. });

  1. $(document).on("pageshow", "#ListaArticulos", function () {
  2.    clearInterval(AutoRefresh);
  3.    DataTable.ajax.reload();
  4.    DataTable
  5.       .columns.adjust()
  6.       .responsive.recalc()
  7.       .draw();
  8. });

After loading the page, it returns me to the previous one.

I hope you have explained me well.