Opened 7 years ago

Closed 5 years ago

#11515 closed Bug (fixed)

Admin actions javascript problem in Firefox.

Reported by: Vasil Vangelovski Owned by: Chi Shang Cheng
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description

Not sure if others consider this a bug or the way this JS should behave, so please discuss this.
In the admin changelist when the user checks some checkbox/es they are highlighted yellow, but in firefox when the page is refreshed this form isn't getting reset so previously checked checkboxes are left checked but not highlighted (after a refresh on the changelist page).
I'm submitting a patch for this, it's just 5 lines of code added to the actions.js, but as I said I find this an aesthetic flaw and I'm not really sure if it was left like that intentionally.

Attachments (2)

django-admin-actions.patch (1.2 KB) - added by Vasil Vangelovski 7 years ago.
patch
django-admin-actions.2.patch (1.2 KB) - added by Vasil Vangelovski 7 years ago.
Update for the patch

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by Vasil Vangelovski

Attachment: django-admin-actions.patch added

patch

comment:1 Changed 7 years ago by Alex Gaynor

milestone: 1.1
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Not a critical blocker for 1.1.

comment:2 Changed 7 years ago by Collin Anderson

for(var i in actionCheckboxes) {

I think this can lead to some problems if someone wants to use prototype or some other javascript framework in the admin.

for(var i = 0; i < actionCheckboxes.length; i++) {

This is safer.

Changed 7 years ago by Vasil Vangelovski

Update for the patch

comment:3 in reply to:  2 Changed 7 years ago by Vasil Vangelovski

Replying to CollinAnderson:

for(var i in actionCheckboxes) {

I think this can lead to some problems if someone wants to use prototype or some other javascript framework in the admin.

for(var i = 0; i < actionCheckboxes.length; i++) {

This is safer.

Thanks. Never used prototype exactly because of this :). I've uploaded the improved version.

comment:4 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:5 Changed 5 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:6 Changed 5 years ago by patchhammer

Easy pickings: unset
Patch needs improvement: set

django-admin-actions.2.patch fails to apply cleanly on to trunk

comment:7 Changed 5 years ago by Julien Phalip

UI/UX: set

comment:8 Changed 5 years ago by Chi Shang Cheng

Owner: changed from nobody to Chi Shang Cheng

I have been unable to reproduce this issue in Firefox-3.5, Firefox-3.6 and Firefox-4.0. I haven't tested older Firefox versions, because I couldn't find the tarballs on the official mirrors. But their market share is negligible (of Firefox-2.0 and Firefox-3.0).

The issue has probably been fixed by a previous jQuery update sometime ago. I think this ticket can be closed.

comment:9 Changed 5 years ago by Vasil Vangelovski

Resolution: fixed
Status: newclosed

I was experiencing this with Firefox 3.something before the admin started using jQuery. It's fixed since 1.2,

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