Bug Tracker

Modify

Ticket #4046 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

.attr("value") 1.2.6 versus 1.3.1

Reported by: bdenosky Owned by:
Priority: major Milestone: 1.3.2
Component: unfiled Version: 1.3.1
Keywords: Cc:
Blocking: Blocked by:

Description

xhtml snippet: <p id="bpUsername"><input name="bpUsername" type="text"/></p>

jquery snippet: alert($("#bpUsername input").attr("value"));

The value is returned correctly in 1.2.6

Upgrading to 1.3.1 resulted in a returned value of "undefined"

Change History

comment:1 Changed 5 years ago by dmethvin

It seems to return an empty string in both versions for me. Is there a particular browser that returns the incorrect value?

Are you serving up this document as application/xml+xhtml ? I wonder if that might cause it to return undefined, or whether it's significant that the markup has no value attribute.

comment:2 Changed 5 years ago by bdenosky

It is being served up as application/xml+xhtml.

If the alert is set to fire after information has been entered into the input field, that's when the error is produced in 1.3.1. In 1.2.6, the value inputted into the field is displayed.

comment:3 Changed 5 years ago by bdenosky

Firefox, Chrome, Safari and IE7 all behaved the same with regards to this bug.

comment:4 Changed 5 years ago by dmethvin

  • Owner set to john

comment:5 Changed 5 years ago by dmethvin

  • Owner john deleted

Can you attach a test case? I just can't make this bug happen.

comment:6 Changed 5 years ago by dmethvin

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

I can't repro this and the OP didn't provide a test case.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


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

 
Note: See TracTickets for help on using tickets.