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

The onCurrentPageChanging and onCurrentPageChanged events are not raised when the survey is in question-per-page mode #9382

Closed
SamMousa opened this issue Jan 31, 2025 · 4 comments
Assignees
Labels
enhancement user issue An issue or bug reported by users

Comments

@SamMousa
Copy link
Contributor

Since, 1.12.16 with the rework of the single question per page mode, the onCurrentPageChanging event no longer fires for the individual questions.

There is no alternative event available.

Originally posted by @SamMousa in #9376

@andrewtelnov
Copy link
Member

andrewtelnov commented Jan 31, 2025

@SamMousa We do not call onPageChanging/onPageChanged event now, because we changed the behavior. We do not create new pages for every questions any more. We render only one question on the same page, one by one.
If needed a new event could be called that tells that the current displayed question is changed.

Thank you,
Andrew

@SamMousa
Copy link
Contributor Author

If needed a new event could be called that tells that the current displayed question is changed.

Yeah that's what this issue is about.
We have several features that depend on us being able to know when the "page" from a user perspective changes. A user will click next and see a new question, in their perception that is a page change.

We do things like checking for quotas, or possibly preventing the change, using the onCurrentPageChanging event. This event now no longer covers the single question per page mode. So we need an alternative.

@andrewtelnov andrewtelnov added enhancement user issue An issue or bug reported by users and removed question labels Jan 31, 2025
@andrewtelnov
Copy link
Member

@SamMousa We will disucss it internally and comeback to you. There is no doubt, there should be an event for this scenario.

Thank you,
Andrew
SurveyJS Team

@RomanTsukanov RomanTsukanov changed the title Since .16 in onCurrentPageChanging in questionPerPageMode The onCurrentPageChanging and onCurrentPageChanged events are not raised when the survey is in question-per-page mode Feb 4, 2025
@SamMousa
Copy link
Contributor Author

SamMousa commented Feb 4, 2025

Fixed via #9388 (putting this here for future reference)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement user issue An issue or bug reported by users
Projects
None yet
Development

No branches or pull requests

3 participants