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
97460433
Unverified
Commit
97460433
authored
Aug 19, 2020
by
Joe Haddad
Committed by
GitHub
Aug 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix IE11 CSS Compatibility (#16336)
parent
25fa1653
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
2 deletions
+36
-2
index.tsx
packages/next/client/index.tsx
+2
-2
css-and-back.js
test/integration/production/pages/css-and-back.js
+16
-0
css-modules.js
test/integration/production/pages/css-modules.js
+1
-0
index.test.js
test/integration/production/test/index.test.js
+17
-0
No files found.
packages/next/client/index.tsx
View file @
97460433
...
...
@@ -648,7 +648,7 @@ async function doRender({
;([].
slice
.
call
(
document
.
querySelectorAll
(
'link[data-n-staging]'
)
)
as
HTMLLinkElement
[]).
forEach
((
el
)
=>
{
el
.
remove
(
)
el
.
parentNode
!
.
removeChild
(
el
)
})
}
renderPromise
.
catch
((
abortError
)
=>
{
...
...
@@ -668,7 +668,7 @@ async function doRender({
// Remove old stylesheets:
;([].
slice
.
call
(
document
.
querySelectorAll
(
'link[data-n-p]'
)
)
as
HTMLLinkElement
[]).
forEach
((
el
)
=>
el
.
remove
(
))
)
as
HTMLLinkElement
[]).
forEach
((
el
)
=>
el
.
parentNode
!
.
removeChild
(
el
))
// Activate new stylesheets:
;[].
slice
...
...
test/integration/production/pages/css-and-back.js
0 → 100644
View file @
97460433
import
Link
from
'next/link'
const
Page
=
({
from
})
=>
(
<
div
>
<
p
>
{
from
}
<
/p
>
<
Link
href
=
"/css-modules"
>
<
a
>
Page
with
CSS
<
/a
>
<
/Link
>
<
/div
>
)
Page
.
getInitialProps
=
()
=>
{
return
{
from
:
typeof
window
===
'undefined'
?
'server'
:
'client'
}
}
export
default
Page
test/integration/production/pages/css-modules.js
View file @
97460433
...
...
@@ -3,5 +3,6 @@ import Logo from '../components/logo'
export
default
()
=>
(
<
div
>
<
Logo
/>
<
input
/>
<
/div
>
)
test/integration/production/test/index.test.js
View file @
97460433
...
...
@@ -417,6 +417,23 @@ describe('Production Usage', () => {
expect
(
newText
).
toBe
(
'server'
)
})
it
(
'should navigate to page with CSS and back'
,
async
()
=>
{
const
browser
=
await
webdriver
(
appPort
,
'/css-and-back'
)
const
initialText
=
await
browser
.
elementByCss
(
'p'
).
text
()
expect
(
initialText
).
toBe
(
'server'
)
await
browser
.
elementByCss
(
'a'
)
.
click
()
.
waitForElementByCss
(
'input'
)
.
back
()
.
waitForElementByCss
(
'p'
)
await
waitFor
(
1000
)
const
newText
=
await
browser
.
elementByCss
(
'p'
).
text
()
expect
(
newText
).
toBe
(
'client'
)
})
it
(
'should navigate to external site and back (with query)'
,
async
()
=>
{
const
browser
=
await
webdriver
(
appPort
,
'/external-and-back?hello=world'
)
const
initialText
=
await
browser
.
elementByCss
(
'p'
).
text
()
...
...
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