When ever I submit a form using ajax, the element that triggered the submit gets focus. I don't want this behavior if I'm using infinite scroll and I want to keep the user at the bottom of the page. How do I fix this?
Focus returns to this element:
$form['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Search'),
'#attributes' => [
'class' => [
'btn',
'btn-md',
'btn-primary',
'use-ajax-submit'
]
],
'#ajax' => [
'wrapper' => $wrapper,
]
];