Bug Tracker

Opened 9 years ago

Closed 8 years ago

#7238 closed bug (fixed)

Bug in "not submit"

Reported by: sven.helmberger@… Owned by:
Priority: low Milestone: 1.4.4
Component: selector Version: 1.4.3
Keywords: selector not submit Cc:
Blocked by: Blocking:

Description

This

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>not submit</title>
<style type="text/css">
</style>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.js">
</script>

<script type="text/javascript"><!--//--><![CDATA[//><!--

$(function()
{
    var $tst = $("#tst");

    $(document.body).append("<pre>is no submit: " + $tst.is("input[type!=submit]") + " </pre>");
});
                                                 
//--><!]]></script>
</head>
<body>
<form action="#" method="get">
<input id="tst" type="password"></input>
</form>
</body>
</html>

prints "is not submit: true" with 1.4.2, but "is not submit: false" with 1.4.3

Change History (7)

comment:1 Changed 9 years ago by sven.helmberger@…

Sorry for the paste

http://jsfiddle.net/PjCsS/

comment:2 Changed 9 years ago by jitter

You also should have said that this only happens for Firefox. In Safari, Opera, Chrome and IE this works fine and returns true.

comment:3 Changed 9 years ago by anonymous

Oh.. double sorry.. Bug shows up in Firefox on Ubuntu and Windows. Chrome/Ubuntu and Windows/IE seem to work fine.

comment:4 Changed 9 years ago by addyosmani

Component: unfiledselector
Keywords: selector not submit added
Priority: undecidedlow
Status: newopen

comment:5 Changed 9 years ago by sven.helmberger@…

Isn't "low" a little too soft on this one? It's breaking existing code, which also was somewhat more meaningful than the example something along the lines of

$(document).keypress(function(ev)
{
   if (ev.keyCode === 13 && 
       $(ev.target).is("input[type!=submit],select,textarea"))
   {
       executePerFieldDefaultButton(target);
   }   
})

can't imagine being the only one who does stuff like this. And breaking existing behaviour is bad.

comment:6 Changed 8 years ago by A.Kuckartz@…

I "star" this issue. (Please correct it)

comment:7 Changed 8 years ago by jitter

Milestone: 1.51.4.4
Resolution: fixed
Status: openclosed

test case works for me in FF 3.6.12 with jQuery 1.4.4

Note: See TracTickets for help on using tickets.