Bug Tracker

Ticket #6743 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

map enctype to encoding, depending on browser

Reported by: Ollie2893 Owned by: timmywil
Priority: low Milestone: 1.7
Component: attributes Version: 1.5.2
Keywords: attr enctype encoding Cc: SlexAxton
Blocking: Blocked by:

Description

I cannot be the first person to raise this request but I cannot find a ticket anywhere. In the .attr(), please harmonize the handling of "enctype" across browsers. For IE this means that jQuery should map "enctype" to "encoding". I figured this out at the end of a frustrating multi-hour debugging session. I really rely on jQuery to take care of these irritating small idiosyncrasies between browsers (lest my code be polluted by browser-specific hacks). Thank you.

Change History

comment:1 Changed 4 years ago by dmethvin

  • Component changed from unfiled to attributes

comment:2 Changed 4 years ago by SlexAxton

  • Cc SlexAxton added
  • Keywords attr enctype encoding added
  • Type changed from enhancement to bug
  • Status changed from new to open
  • Priority set to low

This seems legit. Prototype does this translation as well. I think it could be done with a pretty simple feature test.

I created a possible solution in a jsfiddle.  http://jsfiddle.net/SlexAxton/59znU/

I'll pull a patch sometime soon, unless someone thinks it's a terrible idea?

I usually err on the side of 'this is an enhancement' - but I'd say jQuery should be handling a cross-browser issue like this, so I'll land this as a bug fix (just not the regression kind).

Related Prototype ticket:  https://prototype.lighthouseapp.com/projects/8886/tickets/658-writeattribute-doesnt-work-properly-with-enctypeencoding

comment:3 Changed 4 years ago by SlexAxton

  • Milestone changed from 1.4.3 to 1.5

Moving to appropriate release

comment:4 Changed 4 years ago by jitter

#8186 is a duplicate of this ticket.

comment:5 Changed 4 years ago by jitter

  • Owner set to jitter
  • Status changed from open to assigned
  • Version changed from 1.4.2 to 1.5
  • Milestone set to 1.5.1

comment:6 Changed 4 years ago by timmywil

Any updates on this one? Did we decide we want to add the fix?

comment:7 Changed 4 years ago by timmywil

  • Version changed from 1.5 to 1.5.2
  • Milestone changed from 1.5.1 to 1.next

comment:8 Changed 3 years ago by john

  • Owner changed from jitter to timmywil

Yeah, we should tackle this - as discussed in the bug triage meeting.

comment:9 Changed 3 years ago by timmywil

  • Milestone changed from 1.next to 1.7

comment:10 Changed 3 years ago by timmywil

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

Support setting both the enctype attribute and property (encoding in IE6/7). Fixes #6743.

Changeset: c51b29477e2884fc28cfe4de5b64308177678262

Note: See TracTickets for help on using tickets.