Skip to content

Commit

Permalink
fix implementation after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Aug 18, 2020
1 parent 7afb955 commit 2441c84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/driver/src/cy/commands/traversals.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const autoShadowTraversals = {
},
parent: (cy, $el) => {
const parents = $el.map((i, el) => {
return $elements.getParent(el)
return $elements.getParentNode(el)
})

return sortedUnique(cy, parents)
Expand Down
5 changes: 3 additions & 2 deletions packages/driver/src/dom/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -929,11 +929,11 @@ const getFirstFocusableEl = ($el: JQuery<HTMLElement>) => {
return $el
}

const parent = getParent($el)
const $parent = getParent($el)

// if we have no parent then just return
// the window since that can receive focus
if (!parent.length) {
if (!$parent.length) {
const win = $window.getWindowByElement($el.get(0))

return $(win)
Expand Down Expand Up @@ -1370,6 +1370,7 @@ export {
getFirstStickyPositionParent,
getFirstScrollableParent,
getParent,
getParentNode,
getAllParents,
getShadowRoot,
}

0 comments on commit 2441c84

Please sign in to comment.