A
A
Androbim2019-09-27 14:59:31
JavaScript
Androbim, 2019-09-27 14:59:31

How to prevent element from scrolling on ajax response?

Good day!

There are divs, and inside the table.
The entire table in the div does not fit in width, and it has a horizontal scroll bar - this is the wish of the customer.
In the right columns of the table (they are initially hidden and the divs need to be scrolled horizontally) there are forms that work by ajax, that is,
when they are sent, new values ​​​​come back into the fields of these forms.
And everything would be fine, but the div itself scrolls to the left. That is, to see the changes, the user must manually scroll the div to the right.
The question is, how can you avoid scrolling to the left after a response?

Sincerely.

PS I tried to explain in words, I can provide the code. But... we are talking about gridview yii2 pjax in general, so the code is overloaded with generated html, scripts, etc.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question