as the title, I have also looked for this question on SO, but that question is too old, and the most liked answer is no longer valid. question is here
.to this question, many people"s answer is to determine whether ScrollWidth is greater than OuterWidth, but sometimes there are ellipses when the two values are equal, as shown in the following figure
.