Code

Opened 5 years ago

Closed 3 years ago

#11515 closed Bug (fixed)

Admin actions javascript problem in Firefox.

Reported by: vasiliyeah Owned by: cscheng
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 vasiliyeah 5 years ago.
patch
django-admin-actions.2.patch (1.2 KB) - added by vasiliyeah 5 years ago.
Update for the patch

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by vasiliyeah

patch

comment:1 Changed 5 years ago by Alex

  • milestone 1.1 deleted
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Not a critical blocker for 1.1.

comment:2 follow-up: Changed 5 years ago by 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.

Changed 5 years ago by vasiliyeah

Update for the patch

comment:3 in reply to: ↑ 2 Changed 5 years ago by vasiliyeah

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 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 3 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:6 Changed 3 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 3 years ago by julien

  • UI/UX set

comment:8 Changed 3 years ago by cscheng

  • Owner changed from nobody to cscheng

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 3 years ago by vasiliyeah

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.