Skip to content

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

@Iankodj

Description

@Iankodj

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]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions