Skip to content

Keep pannel close button accessible with external styles #2128

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

Merged
merged 3 commits into from
Apr 27, 2025

Conversation

TomHall2020
Copy link
Contributor

Description

External styles such as missing.css can interfere with the display of the panel header elements, and since these are currently rendered after the button they can appear ontop and block click events from passing through. Fix was fairly straightforward, have just swapped the order of display everwhere I could find these pairs of elements.

Fixes #2083

While the selenium tests are all working, I haven't quite figured out how I could incorporate a regression test for this. I've narrowed the offending css down to this rule:

h1,h2,h3,h4,h5,h6 {
  position:relative;
} 

And I've tested manually that this will break the close button before this PR and not after, but I can't quite see how to approach setting up a test case for this. The test cases I've edited do at least assert that the content of the button is rendered after the headers, so it is indirectly tested for, perhaps that is suffient?

Checklist:

  • I have added the relevant tests for this change (edited existing tests)
  • I have added an item to the Pending section of docs/changes.rst.

@matthiask matthiask merged commit 7522214 into django-commons:main Apr 27, 2025
1 check passed
@matthiask
Copy link
Member

Thank you!

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.

Panel close button can be hidden behind the panel title
2 participants