Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Callback Functions in JavaScript Callbacks and the DOM Using Callbacks on Text Inputs

Kasoma Ibrahim
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Kasoma Ibrahim
Front End Web Development Techdegree Graduate 22,038 Points

Focus did not work on the Form element but on individual elements

Hello. I tried to use the Form to trigger click events on its children but the Focus property did not work, is this a default behaviour of form elements, i tried using the click event which worked well

1 Answer

Jason Larson
Jason Larson
7,955 Points

I'm not certain, but I don't think that forms get focus. Individual elements within the form get focus, but I don't think it applies to the form itself.