Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Contact form breaks One-Page Site skeleton

Started by Muut Archive 9 years ago · 3 replies · 444 views
9 years ago

I'm trying to add a contact form to a one-page site created using Grav's One-Page Site skeleton. It works fine, except for one highly irritating detail: as soon as the comment form is added to the bottom of the page, browsers (Chrome, Firefox, Konqueror) no longer open the page at the top, they jump somewhere to the middle of the page, without, however, targeting any particular anchor.

Here's the test site:

http://arkstack.com

What am I doing wrong? Thanks for any suggestions!

9 years ago

Seems like the contact form has "autofocus" defined on the Name field, and the browser scrolls to that.

9 years ago

The autofocus-attribute really should be outlawed from virtually everywhere, it only works well when the page only contains a form, and this skips a step for user experience.

9 years ago

Turning the autofocus off did the trick. Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1344 9 years ago
Archive · by Muut Archive, 9 years ago
2 930 9 years ago
Archive · by Muut Archive, 9 years ago
2 4058 9 years ago
Archive · by Muut Archive, 9 years ago
1 2943 9 years ago
Archive · by Muut Archive, 9 years ago
3 1116 9 years ago