Skip to content

Commit

Permalink
Merge pull request jquery#434 from Bubbi/bug_7071
Browse files Browse the repository at this point in the history
ticket #7071 - Accessing the 'type' property on VML elements fails on IE during submit special handler
  • Loading branch information
dmethvin committed Aug 4, 2011
2 parents 1846551 + 2d275df commit 84936f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ if ( !jQuery.support.submitBubbles ) {
if ( !jQuery.nodeName( this, "form" ) ) {
jQuery.event.add(this, "click.specialSubmit", function( e ) {
var elem = e.target,
type = elem.type;
type = jQuery.nodeName( elem, "input" ) ? elem.type : "";

if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
trigger( "submit", this, arguments );
Expand All @@ -712,7 +712,7 @@ if ( !jQuery.support.submitBubbles ) {

jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
var elem = e.target,
type = elem.type;
type = jQuery.nodeName( elem, "input" ) ? elem.type : "";

if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
trigger( "submit", this, arguments );
Expand All @@ -737,7 +737,8 @@ if ( !jQuery.support.changeBubbles ) {
var changeFilters,

getVal = function( elem ) {
var type = elem.type, val = elem.value;
var type = jQuery.nodeName( elem, "input" ) ? elem.type : "",
val = elem.value;

if ( type === "radio" || type === "checkbox" ) {
val = elem.checked;
Expand Down

0 comments on commit 84936f1

Please sign in to comment.