Skip to main content

Bug Tracker

Side navigation

#9990 closed bug (duplicate)

Opened August 05, 2011 08:06PM UTC

Closed August 18, 2011 03:31PM UTC

Last modified August 18, 2011 03:31PM UTC

Value for required attribute FireFox 3.6 with JQuery 1.6.2 is undefined

Reported by: mavis0710 Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Reproduce by using:

1.5.2 http://jsfiddle.net/E6vUQ/

1.6.2 http://jsfiddle.net/r9vFs/

OR Test page

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Test required initial value</title>

<meta http-equiv="Pragma" content="no-cache" />

<meta http-equiv="Expires" content="-1" />

<script language="JavaScript" type="text/javascript" src="http://localhost/jquery.js"></script>

<script language="javascript" type="text/javascript">

$(document).ready(function () {

var testRequired = $('input#testRequired');

alert('Required: ' + testRequired.attr('required'));

});

</script>

</head>

<body>

<input type="text" id="testRequired" value="test value" required="true">

</body>

</html>

The attr function returns undefined instead of true

Attachments (0)
Change History (5)

Changed August 09, 2011 12:11AM UTC by jonbergan comment:1

Just noticed this issue in Firefox 3.6.19 also. This code was working fine on 1.4.2 as far as I can recall, however since upgrading to 1.6.1 and 1.6.2, the issue has arisen.

I have a form validation class which uses the required="required" attribute in conjunction with $(obj).attr('required') and it's now returning "undefined".

Any ideas when this will be addressed? Looking at releasing this app as a private beta next month. Would love to be running 1.6.2 but will downgrade to 1.4.2 if necessary.

Thanks guys!

Jon

Changed August 09, 2011 12:12AM UTC by jonbergan comment:2

Just double checked this in Chrome and a few other browsers and they seem to be operating fine. Definitely a Firefox 3.6.x issue.

Thanks.

Jon

Changed August 16, 2011 08:45PM UTC by dflor003 comment:3

I am seeing this in Firefox 3.6 as well. The behavior is not consistent with what happens in IE7, IE8, and Chrome. Have not had a chance to test it with other browsers.

Would definitely like to see this fixed in 1.6.3

Changed August 18, 2011 03:31PM UTC by dmethvin comment:4

_comment0: Lacking a test case, I'm going to guess this is a dup.1313693807835690
resolution: → duplicate
status: newclosed

Edit: Yes this is a dup.

Changed August 18, 2011 03:31PM UTC by dmethvin comment:5

Duplicate of #9504.