Skip to content

Window setOptions method and maximize cause the page to scroll to previously scrolled position #3673

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

Closed
Iankodj opened this issue Oct 12, 2017 · 0 comments
Assignees
Labels
Bug C: Window FP: Completed Sync status with associated Feedback Item jQuery SEV: Medium
Milestone

Comments

@Iankodj
Copy link
Contributor

Iankodj commented Oct 12, 2017

Bug report

restore and maximize methods should restore the scroll position of the page. However, calling setOptions before that causes the page to be scrolled to the previous scroll position.

Reproduction of the problem

http://dojo.telerik.com/aMUrifis

  1. Click on Target 1;
  2. Close the Window;
  3. Scroll to Target 2 and click it;
  4. Close the window;
  5. Scroll back to top and click Target 1;
  6. Close the window

Current behavior

Page is scrolled to Target 2

Expected/desired behavior

The page ti keep its scroll position, where the user scrolled.

Details

setOptions method calls the restore method, which causes the stores inaccurate scroll position to the _documentScrollTop and _documentScrollLeft properties.

A possible workaround is to call the restore method during the close event. http://dojo.telerik.com/Edive

Environment

  • Kendo UI version: 2019.3.1023
  • jQuery version: 1.12.3
  • Browser: [all]
@Juveniel Juveniel self-assigned this Jan 15, 2021
@kendo-bot kendo-bot added FP: Planned Sync status with associated Feedback Item FP: In Development Sync status with associated Feedback Item and removed FP: Planned Sync status with associated Feedback Item labels Jan 15, 2021
@mparvanov mparvanov added this to the 2021.R1.SP.next milestone Jan 27, 2021
@kendo-bot kendo-bot added FP: Completed Sync status with associated Feedback Item and removed FP: In Development Sync status with associated Feedback Item labels Jan 27, 2021
@Dimitar-Goshev Dimitar-Goshev changed the title setOptions method and maximize cause the page to scroll to previously scrolled position Window setOptions method and maximize cause the page to scroll to previously scrolled position Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug C: Window FP: Completed Sync status with associated Feedback Item jQuery SEV: Medium
Projects
None yet
Development

No branches or pull requests

5 participants