Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,12 @@ export default function setupHighlighter(
typeof node.getClientRects === 'function'
? node.getClientRects()
: [];
// If this is currently display: none, then try another node.
// This can happen when one of the host instances is a hoistable.
if (
nodeRects.length > 0 &&
(nodeRects.length > 2 ||
nodeRects[0].width > 0 ||
nodeRects[0].height > 0)
typeof node.getClientRects === 'undefined' || // If Host doesn't implement getClientRects, try to show the overlay.
(nodeRects.length > 0 && // If this is currently display: none, then try another node.
(nodeRects.length > 2 || // This can happen when one of the host instances is a hoistable.
nodeRects[0].width > 0 ||
nodeRects[0].height > 0))
) {
// $FlowFixMe[method-unbinding]
if (scrollIntoView && typeof node.scrollIntoView === 'function') {
Expand Down
Loading