Opened 9 years ago

Closed 9 years ago

#24968 closed Cleanup/optimization (fixed)

ModelAdmin scrollbar problem when actions=None

Reported by: zauddelig Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Normal Keywords: changelist, css
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by zauddelig)

Having a class like this:

class MyModelAdmin(admin.ModelAdmin):
    actions = None

Will lead to a list view with single column table and an unexpected horizontal scrollbar.
The problem appears with Opera.

To my opinion the problem is with this line in django/contrib/admin/static/admin/css/changelists.css:

#changelist table tbody td:first-child, #changelist table tbody th:first-child {
    border-left: 0;
    border-right: 1px solid #ddd;
}

this not takes in consideration when we have th:first-child that is also a last-child the proposed solution is to add this rule:

#changelist table tbody th:first-child:last-child {
    border-right: 0;
}

pull request:
https://github.com/django/django/pull/4849

Change History (2)

comment:1 by zauddelig, 9 years ago

Description: modified (diff)

comment:2 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 64033fd0:

Fixed #24968 -- Removed bad horizontal scrollbar appearing on admin changelist page.

Appeared in Opera with ModelAdmin.actions=None.

Note: See TracTickets for help on using tickets.
Back to Top