code: function getCommonAncestor(el1, el2) {
    var el = el1
    while (el) {
      if (el.contains(el2) || el == el2) {
        return el
      }
      el = el.parentNode
    }
    return null
  }
docs: find the closest common ancestor
  if there's no one, return null
  
  @param  {Element} el1 first element
  @param  {Element} el2 second element
  @return {Element}     common ancestor