Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3825e4a6
Commit
3825e4a6
authored
Jul 12, 2025
by
Ian Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update layout-router.tsx
parent
125d677e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
18 deletions
+1
-18
layout-router.tsx
packages/next/src/client/components/layout-router.tsx
+1
-18
No files found.
packages/next/src/client/components/layout-router.tsx
View file @
3825e4a6
...
@@ -116,11 +116,6 @@ function findDOMNode(
...
@@ -116,11 +116,6 @@ function findDOMNode(
return
internal_reactDOMfindDOMNode
(
instance
)
return
internal_reactDOMfindDOMNode
(
instance
)
}
}
const
hiddenProperties
=
{
display
:
'none'
,
visibility
:
'hidden'
,
'content-visibility'
:
'hidden'
,
}
as
const
/**
/**
* Check if a HTMLElement is hidden or fixed/sticky position
* Check if a HTMLElement is hidden or fixed/sticky position
*/
*/
...
@@ -140,19 +135,7 @@ function shouldSkipElement(element: HTMLElement) {
...
@@ -140,19 +135,7 @@ function shouldSkipElement(element: HTMLElement) {
return
true
return
true
}
}
if
(
element
.
offsetParent
)
{
return
computedStyle
.
display
===
'none'
return
false
}
if
(
'checkVisibility'
in
element
)
{
return
!
element
.
checkVisibility
()
}
return
(
Array
.
from
(
Object
.
entries
(
hiddenProperties
)).
some
(
([
property
,
value
])
=>
computedStyle
.
getPropertyValue
(
property
)
===
value
)
||
parseFloat
(
computedStyle
.
opacity
)
===
0
)
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment