Repository navigation
fix: adjust z-index for ticket type dropdown on ticket form #1106
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
Open
tomrndom
wants to merge
3
commits into
master
Choose a base branch
from
fix/ticket-form-type-ddl-zindex
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+38
−7
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomrndom With the global
menuPortalTarget, a react-select near the bottom of a react-bootstrapModalnow opens its menu on top of its own control and scrolls the page behind the modal.react-select 2.4.4 picks the scroll container from where the menu sits in the DOM (
getScrollParent→getMenuPlacement). Inline, the menu sits inside.modal, which Bootstrap 3 makes the scroll container (.modal-open .modal { overflow-y: auto }). When the menu doesn't fit below the control, react-select scrolls the modal and the menu stays attached; that is the behavior on master. Once the menu is portaled under<body>, the scroll container becomesdocumentElement. react-select then callsanimatedScrollToon the page behind the fixed modal; theoverflow: hiddenthat react-overlays puts on the body doesn't block that. The control stays where it is and the menu moves up by the scroll amount.I reproduced it with react-select 2.4.4 and the Bootstrap 3.3.7 modal rules, with a select 17px above the viewport bottom:
It happens on every open, without the user scrolling, and the list page stays scrolled after the modal closes. Options remain selectable, so it's cosmetic. One likely place to hit it is the "send emails" modal in
summit-speakers-list-page.js: theTagInput/BadgeFeatureInput/TicketTypesInputrows fromSpeakerPromoCodeSpecFormsit low in it.Suggested fix: for selects rendered inside a modal, add
menuPosition="fixed", matching whatadmin-access-form.jsand the events grid filters (summit-event-list-page/helpers.js) already do with a portaled menu. Withfixed, react-select places the menu in viewport coordinates and flips it above the control instead of scrolling the document. In the same repro it opened above the control with no page scroll.I'd avoid making
menuPosition: "fixed"a global default here. On regular pages an open fixed menu doesn't follow the control when the page is scrolled. It would also bring back the bulk-editor issue, becausemenuPortalTarget={null}withfixedstill renders throughMenuPortal. If you'd rather keep this PR as the temporary global fix, documenting it as a known limitation for the legacy modals is fine too.