fix: increase z-index on PageLink and ResourceLink dropdowns#1427
Open
ksnitsky wants to merge 1 commit intoSpinaCMS:mainfrom
Open
fix: increase z-index on PageLink and ResourceLink dropdowns#1427ksnitsky wants to merge 1 commit intoSpinaCMS:mainfrom
ksnitsky wants to merge 1 commit intoSpinaCMS:mainfrom
Conversation
The page/resource picker dropdown used z-10 which was not enough to overlay subsequent form elements (e.g. Trix toolbar). Bump to z-50 so the dropdown always renders on top.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1426.
Context
The
PageLinkandResourceLinkpart types render a dropdown picker (page/resource selector) using an absolutely positioneddivwithz-10. When one of these parts is placed before a rich text (Spina::Parts::Text) part in the theme configuration, the Trix editor toolbar renders on top of the open dropdown, making it impossible to select a page. This is because the Trix toolbar element sits later in the DOM flow and visually overlaps thez-10dropdown.Changes proposed in this pull request
Bump the
z-indexon the dropdown panel fromz-10toz-50in bothpage_links/_form.html.erbandresource_links/_form.html.erb. This ensures the picker dropdown renders above any sibling form elements (Trix toolbars, other inputs) while remaining below Spina's modal overlays (z-40withfixedpositioning, which creates a separate stacking context).Guidance to review PR
PageLinkpart immediately before aText(rich text) part in a section or view template.