yiisoft / jquery-pjax

pushState + ajax = pjax
http://pjax.herokuapp.com
MIT License
144 stars 40 forks source link

pjax reloads full page where is in modal #68

Closed neoacevedo closed 2 years ago

neoacevedo commented 6 years ago

I'm using pjax from a view to reload a gridview without a full page reload. In my JS code I call $.pjax.reload({container: "#container", async: false}); and it works fine on a normal view, I mean, full URL controller action.

But the same code makes a full page reload if I am using it in a modal.

To be more clear, the modal content is filled on a link:

$(document).on('click', '.showModal', function () {
    $('#myModal').modal('show')
            .find('#modalContent')
            .load($(this).attr('href'));
   return false;
});

Obviously in the controller action, the view is rendered with return this->renderAjax('view');.

neoacevedo commented 2 years ago

Ok, 4 years later, the same issue, it doesn't have any solution.