For example:
Notice how the filter overflows the screen, making the filters on the
bottom unreachable.
I've only witnessed this behavior starting at Django 3.1, when the layout
of the screen changes for the sidebar.
--
Ticket URL: <https://code.djangoproject.com/ticket/31986>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: 007, Tom Carrick (added)
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Thanks for this report.
Regression in 2bc38bc7cae002f949157d95e3f0c19ea6b8ca5c (Django 3.1.1).
Reproduced at 5ea1621c724e765c9a642a1b3b6e83419fda920b.
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:1>
Comment (by 007):
At first, I solved the problem with absolute positioning. But it doesn't
look very beautiful. So we use `overflow:hidden` to trigger
[https://developer.mozilla.org/en-
US/docs/Web/Guide/CSS/Block_formatting_context BFC] solve the problem.
But unfortunately it led to other problems. So go back to the absolute
positioning solution.
[https://github.com/django/django/pull/13397 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:2>
* owner: nobody => 007
* status: new => assigned
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:3>
Comment (by john-parton):
Here's a really quick and dirty fix. It requires the browser to support
CSS grids.
{{{
{% extends "admin/base_site.html" %}
{% block extrahead %}
{{ block.super }}
<style>
@media (min-width: 768px) {
#changelist {
display: grid;
grid-template-columns: 1fr 240px;
grid-template-rows: auto auto 1fr;
grid-column-gap: 40px;
grid-row-gap: 0px;
}
#changelist > * {
grid-column-start: 1;
grid-column-end: 1;
margin-right: 0 !important; /* hax :( */
}
#changelist-form > * {
margin-right: 0 !important; /* more hax :( */
}
#changelist #changelist-filter {
position: relative;
grid-area: 1 / 2 / 4 / 3;
}
}
</style>
{% endblock %}-
}}}
The wildcard patterns are to reset margins.
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"8ee4bb6ffcb3346c0fa8fb194986fbf9edadc822" 8ee4bb6f]:
{{{
#!CommitTicketReference repository=""
revision="8ee4bb6ffcb3346c0fa8fb194986fbf9edadc822"
Fixed #31986 -- Fixed admin filter sidebar scrolling.
Regression in 2bc38bc7cae002f949157d95e3f0c19ea6b8ca5c.
Thanks haki for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"57b359343bb3ee733ec8dfaf40be55be4d6d3c5d" 57b3593]:
{{{
#!CommitTicketReference repository=""
revision="57b359343bb3ee733ec8dfaf40be55be4d6d3c5d"
[3.1.x] Fixed #31986 -- Fixed admin filter sidebar scrolling.
Regression in 2bc38bc7cae002f949157d95e3f0c19ea6b8ca5c.
Thanks haki for the report.
Backport of 8ee4bb6ffcb3346c0fa8fb194986fbf9edadc822 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:7>