Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67469

How to detect placeholder text is overflowing in an input field?

$
0
0

My question is about is there any way using JavaScript or CSS to detect the placeholder of an input field is overflowed? We have a lot of methods to find entered value in the input field is overflowed or not. We can use scroll width and offset width for this. But the scroll width is not working for placeholder. we can give text-overflow: ellipsis of CSS to show the ellipsis on the overflowed placeholder. But I can't find any CSS or Javascript methods to detect whether the ellipsis is applied to a place holder or the placeholder text is overflowed in an input field.

Kindly share your thoughts.


Viewing all articles
Browse latest Browse all 67469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>