nova-scroll-top icon indicating copy to clipboard operation
nova-scroll-top copied to clipboard

Scroll to first error is too low if it's the first field

Open jonasbrenig opened this issue 5 years ago • 6 comments
trafficstars

Hi,

thanks for the package.

It's really a shame that this is not a core feature of nova...

error It scrolles up, but stays right below the error, so that it's just outside of the viewport.

So close and yet so far.

Is this easily fixable?

image

image

jonasbrenig avatar Aug 27 '20 10:08 jonasbrenig

I think my PR #6 fixed this, but it hasn't been tagged yet (#8 ).

ragingdave avatar Sep 04 '20 19:09 ragingdave

This is is now supported natively

jonasbrenig avatar Sep 09 '20 14:09 jonasbrenig

I saw your comment on, but I don't see any issues with their implementation, yet. Could you explain the problem in more detail?

jonasbrenig avatar Sep 09 '20 14:09 jonasbrenig

@jonasbrenig If you are talking about the latest Nova update about validation and scrolling. Based on the code changes, it appears to be that on a validation error the form will scroll all the way to the top instead of to a specific error message. This means that a user is sent all the way to the top of the form page instead of a IMHO more friendly specific field. I haven't had a chance to specifically test Nova, but without this package, it's just a sort of bad way to handle validation errors when the errors are shown per field and not at the top.

ragingdave avatar Sep 09 '20 14:09 ragingdave

Ah, I see. I just tested this and indeed you are right, it just scrolls back up to the top instead of to the first field with errors. Maybe you can bring this to David's attention?

jonasbrenig avatar Sep 15 '20 08:09 jonasbrenig

I can potentially put in an issue, but it'll likely be deemed a feature request rather than a bug as so many "features" (aka bugs) have in the past.

ragingdave avatar Sep 15 '20 12:09 ragingdave