+ 2

I want to have this effect like whenever I click on edit button it automatically takes user to input field to edit it[solved]

Also when the user clicks outside it makes the field uneditable(or disabled) again https://code.sololearn.com/W8VYwH7GUWiu/?ref=app

20th Oct 2020, 8:59 PM
Yash ArorašŸ‡®šŸ‡³
Yash ArorašŸ‡®šŸ‡³ - avatar
4 Answers
20th Oct 2020, 11:54 PM
ODLNT
ODLNT - avatar
+ 1
The second thing I wanted was when I click outside it should become uneditable which now I figured out can be done by eventlistener of "blur"
22nd Oct 2020, 11:21 PM
Yash ArorašŸ‡®šŸ‡³
Yash ArorašŸ‡®šŸ‡³ - avatar
0
FOCUS MAN FOCUS. you got this, you can do it if you put your mind to it.... FOCUS!!!!!
23rd Oct 2020, 1:51 AM
SappyB
SappyB - avatar
0
SappyB lol man I got that when he mentioned but I was answering my second question which was that I mentioned it can't be done by htmlElement.focus() cause I wanted that when input field loses focus then it should be uneditable
23rd Oct 2020, 9:04 AM
Yash ArorašŸ‡®šŸ‡³
Yash ArorašŸ‡®šŸ‡³ - avatar