Autoscroll | Autofocus last input field

239 views
Skip to first unread message

Vasiliy Rybkin

unread,
Feb 19, 2022, 12:07:57 PM2/19/22
to Autofill Extension
Hello,
2 versions back there was a feature introduced when a browser did an auto scroll or autofocus at last input field placing it in a center of a window. I could not find how that feature was called in a change log but i found it very useful for me and it saves me some mouse scrolling time. But it was removed in next version... Can we have it back as an option or as a rule for a field?

update:
it seems like i found it:  - Fixed page scrolling while autofilling

Autofill Extension

unread,
Feb 21, 2022, 12:07:09 AM2/21/22
to Autofill Extension
Yeah, that auto-scrolling that you liked was actually a regression bug :-). It was breaking a lot of multi-step forms where step 2 and beyond were "hidden" from view, and by jumping to fields on step 2/3/etc. while they were still on step 1, it messed up the form.

You can easily jump to any field you want using a JavaScript rule.



Vasiliy Rybkin

unread,
Feb 27, 2022, 3:02:56 PM2/27/22
to Autofill Extension
Hi,
Thank you for your suggestion. I have found a workaround using document.querySelector and scrollIntoViewIfNeeded functions.
But the problem i run into is my script is injected after a page is fully loaded only but text fields are inserted instantly
so could it be possible to inject a script at same time as text fields are? For my usage it doesn't matter 
if other content on a page is loaded or not. (I insert some text and scroll to a submit button)

понедельник, 21 февраля 2022 г. в 08:07:09 UTC+3, Autofill Extension:

Autofill Extension

unread,
Feb 28, 2022, 8:15:10 PM2/28/22
to Autofill Extension
JavaScript rules are always executed last on a page. If you want to force a scroll to an element regardless, you can try using https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView (if the element might not be ready yet, you can use setInterval() to poll the DOM until the element is inserted).
Reply all
Reply to author
Forward
0 new messages