Bug Tracker

Ticket #3972 (closed bug: duplicate)

Opened 6 years ago

Last modified 4 years ago

input.val() interprets null as 'null' in IE7

Reported by: zirouk Owned by:
Priority: minor Milestone: 1.3.2
Component: attributes Version: 1.3.1
Keywords: Cc:
Blocking: Blocked by:

Description

If I set the value of an input box with .val(null), IE7 inserts the string 'null' into the input. Firefox 3 correctly sets the input to .

1.2.1 correctly set the value to in both ie7 and ffx3 when using .val(null)

I will attach a html file containing a small demo and hotswap 1.2.1 and 1.3.1.

Attachments

jquerybugtest.html Download (655 bytes) - added by zirouk 6 years ago.
Example

Change History

Changed 6 years ago by zirouk

Example

comment:1 Changed 6 years ago by zirouk

hmm Trac evaluated my double single quotes incorrectly.

Where bad grammar exists describing output, please assume null or empty string.

comment:2 Changed 6 years ago by zirouk

Fix: core.js Line 389 change to:

if ( value === null
value === undefined ) {

comment:3 Changed 6 years ago by zirouk

Again, Trac butchered it, I'm sure you're smart enough to work it out.

comment:4 Changed 5 years ago by ali

Problem still exists in 1.3.2 - tested in Opera and IE7.

jquery version:

  • jQuery JavaScript Library v1.3.2
  • Revision: 6246

comment:5 Changed 5 years ago by dmethvin

  • Priority changed from critical to minor
  • Component changed from unfilled to core

comment:6 Changed 4 years ago by dmethvin

  • Component changed from core to attributes

comment:7 Changed 4 years ago by dmethvin

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

Grouping under #4130.

Note: See TracTickets for help on using tickets.