- Issue created by @steven jones
🐛 When more content is loaded, move focus to first new result Fixed introduced a change that means that when the ajax command for views show more is invoked, the focus is changed to the first new item on the page.
I'm using views show more, plus some custom code that uses an intersection observer to spot when the 'show more' button is about to scroll into the viewport, and it clicks it on behalf of the user.
This works to make a really nice infinite scrolling page, with a really nice fallback, in that the show more button is there etc.
However, in 2.0.2 what happens is:
See above
I wonder if we can detect that the button has focus, when the ajax was invoked, and if it does, do the new focus stuff, otherwise not.
Or maybe you decide that I'm crazy and you don't want to support this use-case :)
Active
2.0
Code