Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ticket 7071 - Accessing the 'type' property on VML elements fails on IE #434

Merged
merged 1 commit into from

4 participants

Bubbi Rick Waldron Dave Methvin robertvogel
Bubbi

Make sure that Internet Explorer 6-8 won't give a "failed" error, when a request for type is made on vml objects.

Testcase for the bug can be found here: http://jsfiddle.net/7p3Yr/23/

Rick Waldron
Collaborator

Please provide a test/unit/event.js test

robertvogel

Hey -

I think I have a simple reduced case that should help - here it is:

http://www.peakdemocracy.com/p/demo/error/statements1.html

Click on the polygon (triangle) and you'll see the error in IE7/8. The error disappears when you remove jquery-ujs, or when you remove

disableDefaultUI: true,

in the options for the googlemap.

Dave Methvin
Owner

This change made it into the IE change special handler but for some reason wasn't applied to the submit one as well.

Dave Methvin dmethvin merged commit 84936f1 into from
DavidDufresne DavidDufresne referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 15, 2011
  1. Bubbi

    Make sure that Internet Explorer 6-8 won't give a "failed" error, whe…

    Bubbi authored
    …n a request for type is made on vml objects
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/event.js
7 src/event.js
View
@@ -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 );
@@ -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 );
@@ -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;
Something went wrong with that request. Please try again.