Skip to content

Conversation

@andreiverse
Copy link

focus input upon accessing the website

always need to click on the input when accessing the website which makes stuff quite annoying looking at how small the click area is

@dbader
Copy link
Owner

dbader commented May 18, 2021

Thanks -- pro-tip, when you click on the "big text area" it'll also clear the input field for you and focuses it:

function enterInputMode(evt) {
var defaultHash = '#' + encodeURIComponent(WELCOME_MSG);
if (location.hash === defaultHash) {
updateFragment('');
renderText();
}
inputField.focus();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants