Ok, I updated it to check for the various overflow: styles and check scrollWidth.