Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next/router & next/link don't work on iphones with ios version 10.x.x #9934

Closed
WEN-JY opened this issue Jan 4, 2020 · 2 comments
Closed

Comments

@WEN-JY
Copy link

WEN-JY commented Jan 4, 2020

Bug report

Describe the bug

my nextjs version is 9.1.7-canary.14,but it's still not work when I downgrade to 9.0.0
here the code is:

import Router from 'next/router';
...
handleClick = (index) => {
        Router.push('/user');
    };
...
<div onClick={this.handleClick}>click</div>

I've tried :
import {withRouter} from'next/router'
import Link from'next/link'
and all above don't work on ios10.x.x

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. create-next-app next-demo
  2. cd next-demo and create a new test page file in pages folder 'test.js',and then type some code in this file
import React from 'react'
const Test = (props) => (
  <div>
    test
  </div>
)
export default Test 
  1. and add router to home page:
    import {useRouter}from 'next/router'
    const router=useRouter()
    the whole test content in home.js is:
import React from 'react'
import {useRouter}from 'next/router'
const Home = () => {
  const router=useRouter()
  const handleClick=()=>{
    console.log('click')
    router.push('/test')}
  return (
  <div>
      <h1 className="title" onClick={handleClick}>welcome to Next!</h1>
  </div>
)}
export default Home

start developing,run yarn dev,you will find that all above works well ,you click the h1 tag and page changed, but this will not work on ios 10.x.x

Expected behavior

next/router support ios10.x.x

Screenshots

If applicable, add screenshots to help explain your problem.
image

System information

  • OS:ios10.0.1 and ios10.2 and ios10.3 are tested,not work
  • Browser (if applies) [e.g. chrome, safari]
  • Version of Next.js:9.1.7 &9.0.0 &9.1.7-canary.14

Additional context

Add any other context about the problem here.

@WEN-JY WEN-JY changed the title next/router & next/link don't work on iphones with ios version 10.x.x after build next/router & next/link don't work on iphones with ios version 10.x.x Jan 4, 2020
@timneutkens
Copy link
Member

Duplicate of #9851

@timneutkens timneutkens marked this as a duplicate of #9851 Jan 4, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants