Skip to content

bug: Ionic React restores scroll position when navigating forward from /foo/0 to /foo/1 #20816

@ibrahimmkara

Description

@ibrahimmkara

Bug Report

Ionic version:
[x] 5.x

Current behavior:
when the user wants to go to another news on a news detail page, he reaches the news that he clicked on the news link, but because the user's location is at the bottom of the page, he has to go up when he wants to see the news

Expected behavior:
I think it should go up automatically every time a link is clicked in the backhend

Steps to reproduce:

Related code:

<>
{
newsdetails.length===0? <IonLoading isOpen={newsdetails.length===0} deneme={() => this.getNews} message={"Haber yükleniyor"} duration={5000}/> :


{newsdetails.map(newdetail =>

<img alt={newdetail.id} className="imgc boyut image paralax-item"
src={https://d.blabla.com/news/${newdetail.image}.jpg}/>


{newdetail.__comment_count} Yorumla
Paylaş

{newdetail.title}


{newdetail.short_content}


{newdetail.date}

<div className="text-content boyut" dangerouslySetInnerHTML={{__html: newdetail.content}}>



)}

}
{
categorys.length===0 ? <IonLoading isOpen={categorys.length===0} message={"Haber yükleniyor"} duration={5000}/> :



AYNI KATAGORİDEN HABERLER



    {categorys.map(category =>

  • <Link to={/news/${category.id}}>

    <img alt={category.id} className="image paralax-item" src={https://d.blabla.com/news/${category.image}.jpg}/>

    {category.title}


  • )}

                    </div>
            }
        </>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions