(n)
| 32 | } |
| 33 | |
| 34 | function getScrollableContainer(n) { |
| 35 | let node = n; |
| 36 | let nodeName; |
| 37 | /* eslint no-cond-assign:0 */ |
| 38 | while ((nodeName = node.nodeName.toLowerCase()) !== 'body') { |
| 39 | const overflowY = computedStyle(node, 'overflowY'); |
| 40 | // https://stackoverflow.com/a/36900407/3040605 |
| 41 | if ( |
| 42 | node !== n && |
| 43 | (overflowY === 'auto' || overflowY === 'scroll') && |
| 44 | node.scrollHeight > node.clientHeight |
| 45 | ) { |
| 46 | return node; |
| 47 | } |
| 48 | node = node.parentNode; |
| 49 | } |
| 50 | return nodeName === 'body' ? node.ownerDocument : node; |
| 51 | } |
| 52 | |
| 53 | const mixin = { |
| 54 | getForm() { |
no test coverage detected