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.