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

Issue with scroll position after ajax request on backend #5021

Closed
1 of 4 tasks
yulek1 opened this issue Apr 5, 2022 · 5 comments
Closed
1 of 4 tasks

Issue with scroll position after ajax request on backend #5021

yulek1 opened this issue Apr 5, 2022 · 5 comments
Assignees
Labels
Low Prio TOPIC Core wontfix This will not be worked on

Comments

@yulek1
Copy link

yulek1 commented Apr 5, 2022

Bug Description

Hi colleagues!

We're currently in process of creating the demo app with UI5 Angular WebComponents, which includes the concept of "draft handling" - ability to store the current working state of the object in so-called "draft" table in the database. That implies that after user changes some field on frontend the request should be immediately fired to backend and new (updated) state shown to user.

That worked quite smooth with WC on Angular until we reached the point when the page was big enought to enable scrolling. Then after each request it starts to scroll the whole page to the top, which looks quite weird. The quick googling results to the router property of Angular called scrollPositionRestoration, which is enabled in our case, but not working unfortunately. Further googling shows that there are some problems and open issue with this property, which is still not solved :(

Therefore the question would be: do you have maybe in the framework some workaround of that behaviour - some page/router attribute/setting which could help to solve the problem?

Thank you in advance!

Expected Behavior

Keep the scroll position after request

Context

  • UI5 Web Components version: {1.1.2}
  • OS/Platform: {macOS 12.2.1 (21D62}
  • Browser: {Chrome Version 98.0.4758.109 (Official Build) (x86_64)}

Priority

  • Low
  • Medium
  • High
  • Very High

Stakeholder Info (if applicable)

  • Organization: {SAP}
  • Business impact: PoC
@nnaydenow nnaydenow self-assigned this Apr 6, 2022
@nnaydenow
Copy link
Contributor

Hi @yulek1 ,

Could you please try to isolate the issue in a snippix (codesandbox) so we can investigate the issue if it comes from ui5-webcomponents?

Regards,
Nayden

@nnaydenow nnaydenow removed their assignment Apr 11, 2022
@stbodurov stbodurov self-assigned this Apr 12, 2022
@stbodurov
Copy link
Contributor

Hi @yulek1,

Just checking in if you have tried isolating the issue without using Angular. You can use https://codesandbox.io/s/ui5-webcomponents-71r1x5o51q?file=/index.html as a starting point.

Please keep in mind that UI5 Web Components is a set of framework-independent UI elements, and functionality such as routing is out of our scope.

Regards,
Stanislav

@yulek1
Copy link
Author

yulek1 commented Apr 12, 2022

Hi @stbodurov ,

Thanks for the link, will do so soon :)

Anyhow, really maybe general Angular issue..

@yulek1
Copy link
Author

yulek1 commented Apr 12, 2022

Upd: seems really independent from Web Components: https://codesandbox.io/s/ui5-webcomponents-forked-zrk5s6?file=/index.html - here it doesn't scroll after request. But also no Router included.
So, yep, guess the problem is on Angular side :(

@stbodurov
Copy link
Contributor

Hello,

The scrolling problem described is Angular Router related, and not reproducible using only UI5 Web Components.
Perhaps @SAP/ui5-webcomponents-core may have a suggestion for a possible workaround.

As routing is out of our scope, I'm closing this issue.

Regards,
Stanislav

@stbodurov stbodurov added wontfix This will not be worked on Low Prio TOPIC Core and removed author action labels Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low Prio TOPIC Core wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants