DEV Community

Discussion on: Amazing Clear Input Using HTML & JS

shagshag profile image
Georges Cubas • Edited on


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

nikhil27b profile image
Nikhil Bobade Author

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

kylesureline profile image
Kyle Scheuerlein

Good point! I think you’re right.