You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.
In TextField.ts, the _addListeners() method needs to be changed to add the code below that is either bolder or between two pairs of asterisks depending on whether Markdown syntax is working on GitHub today). Without this, the text field doesn't get focus when the user clicks it directly on the placeholder text.
if(this._type.indexOf(TextFieldConsts.Type.Placeholder)>=0){this._textField.addEventListener("focus",(event: MouseEvent)=>{this._textFieldLabel.style.display="none";});**// Ensure that the text box gets focus when the placeholder text itself is clicked.this._textFieldLabel.addEventListener("click",(event: MouseEvent)=>{this._textField.focus();});**this._textField.addEventListener("blur",(event: MouseEvent)=>{// Show only if no value in the text fieldif(this._textField.value.length===0){this._textFieldLabel.style.display="block";}});}
Sorry, I can't make pull request because when I try to fork this repo, I get an erroneous message saying that I've already forked it.
The text was updated successfully, but these errors were encountered:
ericthompson
changed the title
bug fix
Textfield doesn't get focus when the user clicks it directly on the placeholder text
Oct 5, 2016
In TextField.ts, the _addListeners() method needs to be changed to add the code below that is either bolder or between two pairs of asterisks depending on whether Markdown syntax is working on GitHub today). Without this, the text field doesn't get focus when the user clicks it directly on the placeholder text.
Sorry, I can't make pull request because when I try to fork this repo, I get an erroneous message saying that I've already forked it.
The text was updated successfully, but these errors were encountered: