#17518 closed Bug (fixed)
Display of StackedInline has glitch with Firefox/Iceweasel (Gecko)
Reported by: | Sebastian Goll | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | comsetic, admin, stacked inline, glitch |
Cc: | sebastian.goll@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description
Current trunk has the following cosmetic problem with StackedInline in the admin. Stacked fieldsets listed with a "Delete" checkbox don't get the full width of the form table on Firefox/Iceweasel (Gecko engine). The glitch happens at least with versions 8.0 and 9.0.1. It does not happen with Chromium 15.0 or Opera 11.60. The problem seems to be that the Gecko engine somehow decides to subtract the width of the "Delete" checkbox from the width of the fieldset below.
I'm attaching two screenshots to illustrate the problem. I'm also attaching a simple patch that fixes the issue, and which has no undesired side-effects on the two other browsers that I could test.
Attachments (5)
Change History (18)
by , 13 years ago
Attachment: | before.png added |
---|
by , 13 years ago
Attachment: | r17364-admin-inline-css.diff added |
---|
by , 13 years ago
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Cc: | added |
---|
comment:3 by , 13 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:4 by , 13 years ago
I can't seem to reproduce this error using Firefox 10.0.2. Could someone else confirm?
comment:5 by , 13 years ago
I just upgraded my local install of Firefox/Iceweasel to 10.0.2, and I'm still experiencing the same error. Note that it's the line between two different fields of the stacked inline model, not the line between "delete" and the first field, that's shorter than the row. (My simplified example above was misleading insofar as it requires an additional field c
in B
to properly reproduce the error as shown in the screenshots. I apologize.)
# models.py class A(models.Model): pass class B(models.Model): a = models.ForeignKey(A) b = models.CharField(max_length=200) c = models.CharField(max_length=200) # admin.py class BInline(admin.StackedInline): model = B class AAdmin(admin.ModelAdmin): inlines = (BInline,) admin.site.register(A, AAdmin)
I'm also using current trunk (r17547, 1.4b1).
comment:6 by , 13 years ago
Thanks for the updated code sample. However, I still can't reproduce the problem. See the attached screenshot. Am I missing something?
by , 13 years ago
Attachment: | 17518-firefox-working.png added |
---|
comment:8 by , 13 years ago
Wow, that is strange. I'm running Linux (Debian wheezy/sid, Linux 3.2.0-1-amd64, X.Org 1.11.3.901). See the attached screenshot of the same admin view as yours, with the broken horizontal lines.
How do we proceed here? Is it an OS bug, an Xorg bug, a bug with Firefox/Iceweasel, a bug with the Gecko engine …? It is only a minor issue after all, so if we decide to not apply the proposed patch but rather blame the browser/OS combination, that'd be perfectly fine with me.
Has the proposed patch (one-liner) any unintended consequences? I.e. would it hurt to include it "just in case"?
by , 13 years ago
Attachment: | 17518-firefox-linux-not-working.png added |
---|
comment:10 by , 13 years ago
I wonder what's causing that issue. Weird :)
The patch makes sense but it'd be useful to test on other browsers, in particular IE7+ which sometimes treat 'width:100%' in a different way.
comment:11 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed #17518 -- CSS glitch in StackedInline.
Thanks sebastian for the report and patch.
Changeset: 3dde02640c1bec4a2b34d12e6f92aa0a7f035227
comment:12 by , 13 years ago
Fixed #17518 -- CSS glitch in StackedInline.
Thanks sebastian for the report and patch.
Changeset: 3dde02640c1bec4a2b34d12e6f92aa0a7f035227
comment:13 by , 13 years ago
Fixed #17518 -- CSS glitch in StackedInline.
Thanks sebastian for the report and patch.
Changeset: 3dde02640c1bec4a2b34d12e6f92aa0a7f035227
PS: The glitch described here is not related to the inlining of thumbnails shown in the screenshots. It also happens with a vanilla project that contains nothing but a parent model and a related model inlined in the parent's admin page: