Skip to main content

Bug Tracker

Side navigation

#7238 closed bug (fixed)

Opened October 18, 2010 01:06PM UTC

Closed November 25, 2010 10:36PM UTC

Bug in "not submit"

Reported by: sven.helmberger@quinscape.de 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

Attachments (0)
Change History (7)

Changed October 18, 2010 01:09PM UTC by sven.helmberger@quinscape.de comment:1

Sorry for the paste

http://jsfiddle.net/PjCsS/

Changed October 18, 2010 02:09PM UTC by jitter comment:2

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

Changed October 18, 2010 02:13PM UTC by anonymous comment:3

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

Changed October 18, 2010 04:34PM UTC by addyosmani comment:4

component: unfiledselector
keywords: → selector not submit
priority: undecidedlow
status: newopen

Changed October 19, 2010 10:06AM UTC by sven.helmberger@quinscape.de comment:5

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''.

Changed November 25, 2010 05:57PM UTC by A.Kuckartz@ping.de comment:6

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

Changed November 25, 2010 10:36PM UTC by jitter comment:7

milestone: 1.51.4.4
resolution: → fixed
status: openclosed

test case works for me in FF 3.6.12 with jQuery 1.4.4