code: function (element) {
        var parent = element.parent();
  
        // jqLite might return a non-null, but still empty, parent; so check for parent and length
        while (hasComputedStyle(parent, 'pointer-events', 'none')) {
          parent = parent.parent();
        }
  
        return parent;
      }
docs: Scan up dom hierarchy for enabled parent;