Closed geekdenz closed 6 years ago
Thanks for taking a shot at this. I'm not a fan of the try
/catch
pattern. Instead of using getting the client rect, I was thinking of parsing the style value, checking if its a percent or not. Here's a similar pattern in Outlayer https://github.com/metafizzy/outlayer/blob/v1.4.2/item.js#L169-L172
I only introduced try/catch because I didn't have much time to do this and it was the quickest and safest I could think of then. But I think using the client rect is fine and actually good practice. Don't you?
I've decided to pass on this request. Thanks again for your contribution!
I believe this fixes this problem in Chrome and should still work in other browsers. Haven't tested those though.