Problem/Motivation

Autocomplete dropdown of 'Authored by' search filter shows behind the content list table header.

Steps to reproduce

1. In Drupal 11.x, ensure that the admin content view (/admin/structure/views/view/content) contains the exposed filter criteria for "Authored by".
2. Go to /admin/content page.
3. Search any username in the 'Authored by' filter.
4. Observe the auto-complete behavior.

Proposed resolution

Apply z-index:501; to .ui-autocomplete class to fix this issue

Remaining tasks

User interface changes

Before Patch

After Patch

API changes

Data model changes

Release notes snippet

Issue fork drupal-3444344

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

VinmayiSwamy created an issue. See original summary.

vinmayiswamy’s picture

StatusFileSize
new369.39 KB
new535 bytes

Applied z-index:1000 in the below patch.

Please review in Drupal 10.2.x

Thanks!

vinmayiswamy’s picture

Assigned: vinmayiswamy » Unassigned
vinmayiswamy’s picture

Title: Claro: Dropdown menu of 'Authored by' search filter shows behind the content list table header. » Claro: Autocomplete dropdown of 'Authored by' search filter shows behind the content list table header.
Issue summary: View changes
vinmayiswamy’s picture

StatusFileSize
new552 bytes
new307.1 KB
new331.06 KB

Observed that the autocomplete values are overlapping on scroll.
Created new patch to decrease z-index to 500.

Attached screenshots for reference

Thanks!

vinmayiswamy’s picture

StatusFileSize
new534 bytes

VinmayiSwamy changed the visibility of the branch 3444344-claro-dropdown-menu to hidden.

vinmayiswamy’s picture

Status: Active » Needs review
vinmayiswamy’s picture

Issue summary: View changes
smustgrave’s picture

Version: 10.2.x-dev » 11.x-dev
Status: Needs review » Needs work

MR has failures

This a problem on 11.x?

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Needs work » Needs review

I have updated the MR for 11.x, also targeted file was wrong on #8. I have fixed it.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Before/after screenshots should be added to the issue summary so leaving that tag.

gauravvvv’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update
StatusFileSize
new109.15 KB
new83.92 KB

Added before/after patch screenshots in issue summary.

mradcliffe’s picture

Issue tags: +Portland2024, +Novice

It looks like this issue is almost ready to be reviewed and tested by the community. Let's review the issue to ensure that issue summary clearly states the merge request to be committed to 11.x. I added the Novice and Portland2024 tags.

Novice issue reserved for the Mentored Contribution during DrupalCon Portland 2024 contribution day. After 2024.05.08, this issue returns to being open to all. Thanks
xjm’s picture

Please also hide the non-canonical MR and check to ensure that the canonical one is mergeable with pipelines passing. Thanks!

kyle.davis’s picture

I am working on reviewing and testing this issue in the mentoring session at DrupalCon Portland. I will update the issue summary as well.

kyle.davis’s picture

Issue summary: View changes
kyle.davis’s picture

Issue summary: View changes

kd_ace changed the visibility of the branch 3444344-claro-Autocomplete-dropdown to hidden.

kd_ace changed the visibility of the branch 3444344-claro-Autocomplete-dropdown to active.

kd_ace changed the visibility of the branch 3444344-claro-dropdown-menu-1 to hidden.

kyle.davis’s picture

Issue summary: View changes
kyle.davis’s picture

Non-canonical MR hidden and issue summary updated and corrected. Issue ready to move to rtbc status.

mradcliffe’s picture

@capysara was mentoring @kd_ace on this issue at DrupalCon Portland 2024. And I have been answering some questions as well this afternoon.

jvest’s picture

Reviewed #27 and tested with @kd_ace, issue looks good for rtbc status.

kyle.davis’s picture

Status: Needs review » Reviewed & tested by the community
mradcliffe’s picture

Status: Reviewed & tested by the community » Needs work

Okay, I went over this again.

1, @jvest, could you rewrite your comment to clarify the steps you took to verify @kd_ace's work?

2, @ultimike pointed out that the merge request is about 29 commits behind. It still passes, but we should probably update the issue fork.

mradcliffe’s picture

Also, when switching from merge requests we can hide the patches to make the issue summary a little easier to parse for final review. I've done that.

jvest’s picture

Adding clarification on testing/review:

Used a shared DrupalPod instance
Enabled Authored By
Added several users added so that the list will be long enough when expanded

The overlay issue appearing behind the table heading is fixed.
Also manually changed the z-index back to original to show the original problem of the drop down appearing behind the table heading.

ericrubino made their first commit to this issue’s fork.

kyle.davis’s picture

Status: Needs work » Reviewed & tested by the community

Updated MR again and tests completed successfully. Moving to RTBC!

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work

Left a comment in the MR as to why we need to find something different from the current solution.

The issue is due to this style that is added to sticky table headers:

.position-sticky thead {
    position: sticky;
    z-index: 500;
    top: var(--drupal-displace-offset-top, 0);
}

This high Z-index is only necessary when the header is actually "stuck", but the Z-index is applied in either state. Unfortunately there is no way to target "stuck" elements with CSS only, so this leaves us with two approaches:

  1. Use Javascript to determine the coordinates of the table header and conditionally provide a z-index boosting class only when stuck at the top (and accounting for offsets such as toolbar)
  2. Update the Z-index of the dropdown, but target something specific to autocomplete vs. the current approach of targeting ui-frontIf an autocomplete dropdown is open, it's reasonably safe to assume it should be above other elements. An autocomplete-specific z-index boost (vs ui-front) is easier to test and less at risk of causing unwanted side effects
kyle.davis’s picture

Thanks for the comment bnjmnm. I can definitely see where you are coming from and would be happy to help find a solution. I plan on looking into option 2 a bit more and seeing if I can propose a better css change than the current MR.

Mithun S made their first commit to this issue’s fork.

Mithun S changed the visibility of the branch 3444344-claro-Autocomplete-dropdown to hidden.

mithun s’s picture

Status: Needs work » Needs review

Thought of a different approach without changing the global css. Decreased the z-index value of the table header based on the content page so that the autocomplete dropdown doesn't hide behind it. Also checked the table header remains sticky on the content pages.
Please review.

smustgrave’s picture

Status: Needs review » Needs work

MR has a bunch of test failures.

Also if a new approach is going to be used then issue summary will have to be updated and fresh set of screenshots added. Moving to NW for that.

mithun s’s picture

Title: Claro: Autocomplete dropdown of 'Authored by' search filter shows behind the content list table header. » Claro: Update the z-index value of the table header in claro for content page.

Pushed a rebase for the PR and now the test failures are passed.

bnjmnm’s picture

The z-indexes in Drupal are documented and considered stable. Custom Themes and modules are built knowing what these core z-indexes are, so reducing the z-index of a sticky header by 400 could be disruptive, where suddenly many elements can bleed through sticky header that were previously covered by it.

bnjmnm’s picture

Title: Claro: Update the z-index value of the table header in claro for content page. » Claro: Autocomplete dropdown bleeds through sticky table header

Changing the issue title to describe the problem and not a potential solution.

Utkarsh_33 made their first commit to this issue’s fork.

utkarsh_33’s picture

Added z-index according to

Update the Z-index of the dropdown, but target something specific to autocomplete vs. the current approach of targeting ui-frontIf an autocomplete dropdown is open, it's reasonably safe to assume it should be above other elements. An autocomplete-specific z-index boost (vs ui-front) is easier to test and less at risk of causing unwanted side effects

.

utkarsh_33’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe the changes addresses the concern by @bnjmnm and still addresses the issue.

LGTM

quietone’s picture

Thank you to everyone who worked on this issue and got it to RTBC!

I have read the issue summary, comments and the MR. Thank you to @bnjmnm for creating a meaningful title. The title is used in the commit message so this is helpful to anyone going through the git logs. I did not find any unanswered questions. I don't do front end so I can not comment on the validity of the change.

Leaving at RTBC.

nod_’s picture

Version: 11.x-dev » 11.0.x-dev
Status: Reviewed & tested by the community » Needs work

Let's use 501 as the zindex instead of 600. 600 is not used anywhere at the moment

gauravvvv’s picture

Status: Needs work » Needs review
sdhruvi5142’s picture

StatusFileSize
new258.7 KB

Hi
Verified MR !8108 on Drupal Version 11.0.x dev and the patch is getting failed.

Testing steps that are followed:
1. Install Claro theme with Drupal 11.0.x
2. Go to /admin/content page.
3. Searched username in the 'Authored by' filter.
4. Observed the auto-complete behavior.

Testing result:
Was able to replicated the issue but when I was applying the patch it was failing. Adding SS below for reference.

Status : Fail

Thanks

nod_’s picture

Status: Needs review » Needs work

thanks @Gauravvvv There a is a duplicated rule we don't need, after that it's good to go.

utkarsh_33’s picture

Status: Needs work » Needs review

Addressed feedbacks.

idebr’s picture

Issue summary: View changes

Updated the issue summary to match the current resolution.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe this to be addressed.

  • nod_ committed dac6366f on 10.4.x
    Issue #3444344 by VinmayiSwamy, Utkarsh_33, Gauravvvv, Mithun S, kd_ace...

  • nod_ committed cabbb939 on 11.0.x
    Issue #3444344 by VinmayiSwamy, Utkarsh_33, Gauravvvv, Mithun S, kd_ace...

  • nod_ committed e2d82428 on 11.x
    Issue #3444344 by VinmayiSwamy, Utkarsh_33, Gauravvvv, Mithun S, kd_ace...
nod_’s picture

Version: 11.0.x-dev » 10.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed e2d8242830 to 11.x and cabbb9391f to 11.0.x and dac6366fd6 to 10.4.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

emb03’s picture

Is there a patch for this for Drupal versions below 10.4? patch 7 has a z-index of 500 not 501 there is no patch 8

juanolalla’s picture

StatusFileSize
new748 bytes

Here is the patch for 10.3.x, exactly the same as the fix committed in 10.4.x.

msantin0’s picture

Hi,

Thank you for providing the patch for 10.3.x.

Could you please confirm if there are plans to merge this patch into 10.3.x as well? Resolving this issue in the 10.3.x branch would be highly beneficial for projects currently relying on that version.

Looking forward to your response!

Best regards.