* Directionally scroll the scrollable spatial navigation container if it can be manually scrolled more. * @function scrollingController * @param container {Node} - The spatial navigation container which can scroll * @param dir {SpatialNavigationDirection} - The directional information for t
(container, dir)
| 274 | * @returns {boolean} |
| 275 | */ |
| 276 | function scrollingController(container, dir) { |
| 277 | |
| 278 | // If there is any scrollable area among parent elements and it can be manually scrolled, scroll the document |
| 279 | if (isScrollable(container, dir) && !isScrollBoundary(container, dir)) { |
| 280 | moveScroll(container, dir); |
| 281 | return true; |
| 282 | } |
| 283 | |
| 284 | // If the spatnav container is document and it can be scrolled, scroll the document |
| 285 | if (!container.parentElement && !isHTMLScrollBoundary(container, dir)) { |
| 286 | moveScroll(container.ownerDocument.documentElement, dir); |
| 287 | return true; |
| 288 | } |
| 289 | return false; |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * Find the candidates within a spatial navigation container include delegable container. |
no test coverage detected