[CORL-1227] Fix scroll-able modal position popping #3069
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a
disableScroll
option onto modals and uses it for theSiteModeratorModal
.The site moderator modal already has a scroll bar inside it and its height is less than 480px. We don't need a scrollbar on the modal background since the modal window will always be fully visible on even the smallest screens.
This eliminates the bug of the modal sliding away when there are enough sites in the org to cause the background scroll to be activated.
Fixes the input element positioning on our custom Checkboxes
The checkboxes use a
::before
to create a custom styled checkbox that matches our theming. They also hide away the actual input element, which was not being positioned relative to the checkbox root. Because of this, they were appearing relative to the scrolled modal root, sometimes far below the modal's scroll-able area, which shoved the modal way up on the screen.This positions the checkbox input element relative to the checkbox root and fixes it to the positioning of the stylized checkbox. This prevents it from appearing in weird places due to being inside a scroll-able element or paginated, scroll-able element.
What changes to the GraphQL/Database Schema does this PR introduce?
None
How do I test this PR?
SITE_MODERATOR
feature flag