Opened 4 years ago

Closed 4 years ago

Last modified 4 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 4 years ago.
Django 1.7.8 in Firefox 37
Screen-2015-05-11_13-49.png (1.5 KB) - added by David Hobbs 4 years ago.
Django 1.8.1 in Firefox 37
Screen-2015-05-11_13-50.png (3.5 KB) - added by David Hobbs 4 years ago.
Django 1.8.1 related-widget-wrapper too narrow

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by David Hobbs

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

Django 1.7.8 in Firefox 37

Changed 4 years ago by David Hobbs

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

Django 1.8.1 in Firefox 37

Changed 4 years ago by David Hobbs

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

Django 1.8.1 related-widget-wrapper too narrow

comment:1 Changed 4 years ago by David Hobbs

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

comment:2 Changed 4 years ago by Tim Graham

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

comment:3 in reply to:  2 Changed 4 years ago by David Hobbs

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 Changed 4 years ago by Tim Graham

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']}),
    ]

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

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 Changed 4 years ago by Tim Graham

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:7 Changed 4 years ago by Tim Graham

Has patch: set

comment:8 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In fb94e7b:

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

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

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