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

Add event to control scrolling elemen on top. #2047

Closed
andrewtelnov opened this issue Mar 25, 2020 · 0 comments
Closed

Add event to control scrolling elemen on top. #2047

andrewtelnov opened this issue Mar 25, 2020 · 0 comments

Comments

@andrewtelnov
Copy link
Member

@andrewtelnov andrewtelnov commented Mar 25, 2020

Add an event that will allow to scroll/show element inside the survey on page using external code instead the default code. It requires in case of there is a header with a fixed height on the page.

  /**
   * Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.element` - an element that is going to be scrolled on top.
   * <br/> `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null.
   * <br/> `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null.
   * <br/> `options.elementId` - the unique element DOM Id.
   * <br/> `options.cancel` - set this property to true to cancel the default scrolling.
   */
  public onScrollingElementToTop: Event<
    (sender: SurveyModel, options: any) => any,
    any
  > = new Event<(sender: SurveyModel, options: any) => any, any>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.