components/tip/index.js
/**
     * Get the first scrollable parent,
     * so we can append the tip element to
     * the right parent container
     */
Get the first scrollable parent,
so we can append the tip element to
the right parent container
Get the first scrollable parent so we can append the tip element to the right parent container
$_getFirstScrollWrapper(node) {
      if (node === null || node === document.body) {
        return node
      }
      const overflowY = window.getComputedStyle(node).overflowY
      const isScrollable = overflowY !== 'visible' && overflowY !== 'hidden'
      const isScrollView = node && node.getAttribute('scroll-wrapper') !== null
      if ((isScrollable && node.scrollHeight > node.clientHeight) || isScrollView) {
        return node
      } else {
        return this.$_getFirstScrollWrapper(node.parentNode)
      }
    }
$_getFirstScrollWrapper ( node ) { if ( node === null || node === document . body ) { return node } const overflowY = window . getComputedStyle ( node ) . overflowY const isScrollable = overflowY !== 'visible' && overflowY !== 'hidden' const isScrollView = node && node . getAttribute ( 'scroll-wrapper' ) !== null if ( ( isScrollable && node . scrollHeight > node . clientHeight ) || isScrollView ) { return node } else { return this . $_getFirstScrollWrapper ( node . parentNode ) } }
Get the first scrollable parent,
 so we can append the tip element to
 the right parent container
Get the first scrollable parent so we can append the tip element to the right parent container