Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#24784 closed Bug (fixed)

Admin interface ForeignKey field select widget partially hidden in Firefox

Reported by: David Hobbs Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

This problem appeared in Django 1.8 (it remains in 1.8.1) -- it's fine in 1.7.8. The size of the "related-widget-wrapper" is too narrow, and the select widget overflow gets hidden. This is in Firefox 37 -- it doesn't get hidden in Chrome (I didn't try other browsers), but I think the layout of objects within the wrapper did change in Chrome.

Attachments (3)

Screen-2015-05-11_13-47.png (1.6 KB ) - added by David Hobbs 10 years ago.
Django 1.7.8 in Firefox 37
Screen-2015-05-11_13-49.png (1.5 KB ) - added by David Hobbs 10 years ago.
Django 1.8.1 in Firefox 37
Screen-2015-05-11_13-50.png (3.5 KB ) - added by David Hobbs 10 years ago.
Django 1.8.1 related-widget-wrapper too narrow

Download all attachments as: .zip

Change History (12)

by David Hobbs, 10 years ago

Attachment: Screen-2015-05-11_13-47.png added

Django 1.7.8 in Firefox 37

by David Hobbs, 10 years ago

Attachment: Screen-2015-05-11_13-49.png added

Django 1.8.1 in Firefox 37

by David Hobbs, 10 years ago

Attachment: Screen-2015-05-11_13-50.png added

Django 1.8.1 related-widget-wrapper too narrow

comment:1 by David Hobbs, 10 years ago

It looks like it only happens when the ForeignKey field is in a row with other fields.

comment:2 by Tim Graham, 10 years ago

How do you make the ForeignKey field appear in a row with other fields?

in reply to:  2 comment:3 by David Hobbs, 10 years ago

Replying to timgraham:

How do you make the ForeignKey field appear in a row with other fields?

In admin.py, for example:

fieldsets = (
    (None, {'fields': (('status', 'created', 'modified'),)}),
)

And 'status' is a ForeignKey.

comment:4 by Tim Graham, 10 years ago

I tried to reproduce using the tutorial, but the "Poll" selector appears fine. Does this code reproduce the problem for you? Tested on Ubuntu 14.04 and Firefox 38.

class ChoiceAdmin(admin.ModelAdmin):
    fieldsets = [
        (None, {'fields': ['poll', 'votes']}),
    ]

in reply to:  4 comment:5 by David Hobbs, 10 years ago

Replying to timgraham:

I tried to reproduce using the tutorial, but the "Poll" selector appears fine. Does this code reproduce the problem for you? Tested on Ubuntu 14.04 and Firefox 38.

class ChoiceAdmin(admin.ModelAdmin):
    fieldsets = [
        (None, {'fields': ['poll', 'votes']}),
    ]

Using the tutorial I was able to reproduce with:

class ChoiceAdmin(admin.ModelAdmin):
    fieldsets = [
        (None, {'fields': [('question', 'votes')]}),
    ]

Note the parens around the two fields to put them on the same line. This is on Windows 7 w/ Firefox 37.

comment:6 by Tim Graham, 10 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:7 by Tim Graham, 10 years ago

Has patch: set

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

Resolution: fixed
Status: newclosed

In fb94e7b:

Fixed #24784 -- Fixed visibility regression in admin's FK widget.

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

In aeafdf9:

[1.8.x] Fixed #24784 -- Fixed visibility regression in admin's FK widget.

Backport of fb94e7b8cf8f68629b51a4d4f2c37400ef1c7469 from master

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