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

fix(ui5-dialog): correctly restore body scrolling on ESC #3696

Merged
merged 3 commits into from
Aug 25, 2021

Conversation

dimovpetar
Copy link
Contributor

@dimovpetar dimovpetar commented Aug 19, 2021

Body scrolling is now blocked only on first call of blockBodyScrolling and restored on the last call of unblockBodyScrolling.

Fixes #3690

@dimovpetar dimovpetar requested review from a team, ilhan007, vladitasev, fifoosid and MapTo0 August 19, 2021 15:17
ilhan007
ilhan007 previously approved these changes Aug 23, 2021
Copy link
Contributor

@alexandar-mitsev alexandar-mitsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also fix OpenedPopupsRegistry.js, line 38 should be
openedRegistry[openedRegistry.length - 1].instance.close(true);
instead of
openedRegistry.pop().instance.close(true);

this on its own is also fixing the issue, but can be fixed in combination

@dimovpetar
Copy link
Contributor Author

also fix OpenedPopupsRegistry.js, line 38 should be
openedRegistry[openedRegistry.length - 1].instance.close(true);
instead of
openedRegistry.pop().instance.close(true);

this on its own is also fixing the issue, but can be fixed in combination

You are right, I've changed the OpenedPopupsRegistry to not implicitly remove the popup.
But the logic in Popup.js is still needed, because there might be a popup that is not blocking the scrolling. Therefore, we need to maintain information about those blockers.

@Lukas742
Copy link
Collaborator

Hi colleagues,

could you kindly also include this in the next release of the 0.31 sf branch. Thanks :)

@ilhan007
Copy link
Member

Hi @Lukas742 yes, we will do that

ilhan007 pushed a commit that referenced this pull request Sep 10, 2021
Body scrolling is now blocked only on first call of blockBodyScrolling and restored on the last call of unblockBodyScrolling.

Fixes #3690
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui5-dialog: scrolling is blocked when dialog is closed with Esc key
4 participants