Custom .js file: auto focus cursor in the login page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2015
10:27 AM
I've been trying to use jQuery's $.focus() method to trigger the cursor to land in the user id field of the login field of Canvas if it's not already there. When observing various attempts at doing this in the developer console:
$("#pseudonym_session_unique_id").trigger("focus");
$("#pseudonym_session_unique_id").focus()
These all seem to just return the input element itself and I cannot override the default behavior of the page. Is there a simpler way of doing this that I'm overlooking?
Apologies for duplicating this question from this question page: Auto focus cursor in the login page