Skip to main content

Bug Tracker

Side navigation

#3972 closed bug (duplicate)

Opened January 23, 2009 03:43PM UTC

Closed August 20, 2010 02:59PM UTC

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:
Blocked by: Blocking:
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 (1)
Change History (7)

Changed January 23, 2009 03:45PM UTC by zirouk comment:1

hmm Trac evaluated my double single quotes incorrectly.

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

Changed January 23, 2009 04:40PM UTC by zirouk comment:2

Fix:

core.js Line 389 change to:

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

Changed January 23, 2009 04:40PM UTC by zirouk comment:3

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

Changed July 24, 2009 04:05PM UTC by ali comment:4

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

jquery version:

Changed August 08, 2009 02:16AM UTC by dmethvin comment:5

component: unfilledcore
priority: criticalminor

Changed June 20, 2010 07:33PM UTC by dmethvin comment:6

component: coreattributes

Changed August 20, 2010 02:59PM UTC by dmethvin comment:7

resolution: → duplicate
status: newclosed

Grouping under #4130.