Re: [csswg-drafts] [cssom-view] Consider adding Element.scrollParent

> I checked the "workaround" in jQuery UI, and it seems to me that it just checks the value of overflow? Is that enough for the usecases? I mean, having overflow: auto doesn't mean the element would have scrollbar, let alone whether it would be scrollable. (Actually having overflow: hidden doesn't even mean the element being not scrollable given that author can implement custom scrollbar with setting overflow to hidden.)

@upsuper that's weird. I haven't looked at the code, but that seems very problematic. Wouldn't it be simpler determine if an element is "scrollable" by just doing

 ```js
if (parentElement.clientHeight < parentElement.scrollHeight) {
   // element is scrollable parent
}
```

-- 
GitHub Notification of comment by mkay581
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1522#issuecomment-310913560 using your GitHub account

Received on Sunday, 25 June 2017 16:44:03 UTC