DEV Community

Discussion on: Amazing Clear Input Using HTML & JS

Collapse
 
shagshag profile image
Georges Cubas • Edited

Hello,

type="search" is for search, not for the ability to clean the input. Using it for an username, except if it's for search an username, is not a good practice. This could involve side effects in the future. Moreover Firefox Desktop doesn't seem to display the cross.

To OP, you have an error in your HTML : type=“search" the first quotes are invalid, curly quotes instead of straight quotes

Collapse
 
nikhil27b profile image
Nikhil Bobade

I actually first using simple type="text" but kyle suggest me to use type="search"

Collapse
 
kylesureline profile image
Kyle Scheuerlein

Good point! I think you’re right.