Bug Tracker

Modify

Ticket #12577 (closed bug: patchwelcome)

Opened 8 months ago

Last modified 5 days ago

'SCRIPT3: Member not found' with .attr(novalidate or aria-nocomplete)

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.1
Keywords: Cc:
Blocking: Blocked by:

Description

I am working on Windows 8 with IE8 in compatibility view. This browser gives the error "Member not found" if some attributes are set. One of the attributes is the attribute "novalidate" on a form element, another attribute is the attribute "aria-nocomplete" on an input element. It occurs in the following code where the "nodeValue" is set:

	// Use this for any attribute in IE6/7
	// This fixes almost every IE6/7 issue
	nodeHook = jQuery.valHooks.button = {
		get: function( elem, name ) {
			var ret;
			ret = elem.getAttributeNode( name );
			return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
				ret.nodeValue :
				undefined;
		},
		set: function( elem, value, name ) {
			// Set the existing or create a new attribute node
			var ret = elem.getAttributeNode( name );
			if ( !ret ) {
				ret = document.createAttribute( name );
				elem.setAttributeNode( ret );
			}
			return ( ret.nodeValue = value + "" );
		}
	};

Ticket http://bugs.jquery.com/ticket/11957 seems to be related, but is closed.

Change History

comment:1 Changed 8 months ago by dmethvin

  • Owner set to anonymous
  • Status changed from new to pending

I agree the other report seems similar, but it also lacked enough information for us to do anything. Can you make a test case so we can see the conditions when it fails? Use jsFiddle.net to create your test case. Be sure to test against the jQuery git("edge") version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 8 months ago by liy099@…

 http://jqueryui.com/demos/autocomplete/default.html

This demo is promised to fail in ie7.

comment:3 follow-up: ↓ 4 Changed 8 months ago by scott.gonzalez

I'm sorry, but your promise has fallen short and that demo works flawlessly for me in IE7, which is fully expected as nobody else has reported such a problem with autocomplete. Do you have any browser extensions installed that might be causing issues? Are you able to reproduce this on other machines?

comment:4 in reply to: ↑ 3 Changed 8 months ago by liy099@…

Replying to scott.gonzalez:

I'm sorry, but your promise has fallen short and that demo works flawlessly for me in IE7, which is fully expected as nobody else has reported such a problem with autocomplete. Do you have any browser extensions installed that might be causing issues? Are you able to reproduce this on other machines?

I tested it on my IE10 with IE7 mode, console showed "Member not found" error. But it works fine on IE9's IE7 mode. So maybe it's an IE10's-IE7-mode-specific bug?

comment:5 Changed 8 months ago by kee.yang@…

I see this same problem when I use (1) Windows 8, (2) Browser Mode: IE10, (3)Document Mode: IE7 standards. This problem also fails on jQuery ui demo site here:  http://jqueryui.com/demos/autocomplete/

My work around is to put a try/catch around the line "return ( ret.nodeValue = value + "" );" or do the following:

set: function( elem, value, name ) {
     if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.documentMode <= 7) {
          elem.setAttribute(name, value);
	  return elem.getAttributeNode(name);
     } else {
          // Set the existing or create a new attribute node
	  var ret = elem.getAttributeNode( name );
	  if ( !ret ) {
	       ret = document.createAttribute( name );
	       elem.setAttributeNode( ret );
	  }
          return ( ret.nodeValue = value + "" );
     }
}

comment:6 Changed 7 months ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:7 Changed 7 months ago by willem.odendaal@…

I can confirm that I get the same problem. Windows 8, IE10 with browser mode IE7. Also on a form with auto complete turned off.

comment:8 Changed 6 months ago by anonymous

I can confirm that I get the same problem. Windows 8, IE10 with browser mode IE7. Also on a form with auto complete turned off.

Same here

comment:9 Changed 6 months ago by dan@…

I am also hitting the same issue with IE10 Release Preview on Windows 7, with IE10 set to Browser mode: IE7 and Document Mode: IE7 standards.

This does not repro in standalone IE7, or IE9 with Browser mode: IE7 and Document Mode: IE7 standards, so possibly an IE10 related bug?

comment:10 Changed 6 months ago by dmethvin

I still cannot repro, which makes me think this may be due to some browser add-on such as a form filler. Let's compare screen shots. Here is mine showing several different browser/document modes with no errors, and the add-ons that were installed:

comment:11 Changed 6 months ago by anonymous

This happens when IE 10 is set to IE7 Browser Mode and Document Mode IE7 standards.

The issue occurs when using the jQuery Validation Plugin (I'm using version 1.10.0).

The plugin tries to set a 'novalidate' attribute on the form tag. This fails.

comment:12 Changed 6 months ago by mail@…

Same issue for me, Windows 8, IE10 in IE7 mode.

comment:13 Changed 6 months ago by anonymous

Hello,

Same problem here.

Again, only in IE 10 in IE7 mode.

comment:14 Changed 6 months ago by anonymous

Same thing here. Apparently it's something to do with Win8 and IE10's IE7 compat mode. I got it to work by changing the set to the following:

            set: function (elem, value, name) {
                // Set the existing or create a new attribute node
                var ret = elem.getAttributeNode(name);
                if (!ret) {
                    ret = document.createAttribute(name);
                    elem.setAttributeNode(ret);
                }
                elem.setAttribute(name, value + "");
                return (ret.value);
            }

I'm not sure as to the ramifications of this change, but for now it appears to be working.

jQuery 1.8.3

comment:15 follow-up: ↓ 16 Changed 5 months ago by danmiser@…

I'm seeing exactly the same thing. How do we get this bug to get re-opened?

comment:16 in reply to: ↑ 15 Changed 5 months ago by gibson042

Replying to danmiser@…:

I'm seeing exactly the same thing. How do we get this bug to get re-opened?

Provide a complete reduced test case on jsFiddle/jsbin/etc. against jQuery 1.8.3 and/or edge to help us assess the issue.

I recommend forking from this boilerplate:  http://jsfiddle.net/FrKyN/

comment:17 Changed 5 months ago by anonymous

comment:18 Changed 5 months ago by dmethvin

#13023 is a duplicate of this ticket.

comment:20 Changed 5 months ago by dmethvin

  • Status changed from closed to reopened
  • Resolution invalid deleted

Can you post a link to your Microsoft report at connect.microsoft.com? I see the error but don't see that jQuery is doing anything wrong here.

comment:21 Changed 5 months ago by dmethvin

  • Status changed from reopened to pending

comment:22 Changed 5 months ago by dmethvin

Simpler repo without the try/catch, whose presence seems to hose the debugger:  http://jsfiddle.net/xPc3p/4/

comment:23 Changed 5 months ago by dmethvin

Screen shot of the error and state:  http://i.imgur.com/IyQ8Z.png

comment:24 Changed 5 months ago by vortexwolf

Bug is still reproduced but no one cares.

Also, the obvious and easy fix: Add novalidate tag if HTML5.

if (!$.browser.msie
$.browser.version > 7) {

this.attr('novalidate', 'novalidate');

}

comment:25 Changed 5 months ago by vortexwolf

Code with correct formatting

// Add novalidate tag if HTML5.
if (!$.browser.msie || $.browser.version > 7) {
	this.attr('novalidate', 'novalidate');
}

comment:26 Changed 5 months ago by rwaldron

jQuery no longer supports jQuery.browser in the core library.

comment:27 Changed 5 months ago by anonymous

  • Status changed from pending to new

OK so what is the vote for a workaround at this point? I experience it as well in IE10 w/ document mode IE7. I am using jQuery Validation Plugin 1.9.0 w/ jQuery 1.7.1. Thank you!

comment:28 follow-up: ↓ 47 Changed 5 months ago by dmethvin

Please go to the Microsoft bug tracker and vote up this bug:  https://connect.microsoft.com/IE/feedback/details/774078 You may need to register at the site with a Live ID.

Do not post "me toos" here.

comment:29 Changed 5 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to patchwelcome

I'm closing this pending investigation by Microsoft. Nobody else has voted up the ticket there. May be reopened based on their response. Don't post here, register at the Microsoft site and upvote the ticket or add more information.

comment:30 Changed 5 months ago by dmethvin

#12844 is a duplicate of this ticket.

comment:31 Changed 5 months ago by anonymous

voting up... i also get this.

comment:32 Changed 5 months ago by mikesherov

anonymous: http://bugs.jquery.com/ticket/12577#comment:28

do not post "me toos" here. Please go to the Microsoft bug tracker and vote up this bug:  https://connect.microsoft.com/IE/feedback/details/774078 You may need to register at the site with a Live ID.

comment:33 Changed 4 months ago by seuberling@…

having signed in with my Live ID, that Microsoft link leads to an error page. where to turn now? I'm not using compatibility mode, but IE7 through a virtual machine

comment:34 Changed 4 months ago by zsg@…

go to  https://connect.microsoft.com/, search for IE10, click join, create profile, ignore xml error, repeat from top, come back here and click on link for issue. (worked for me)

comment:35 Changed 4 months ago by dmethvin

  • Summary changed from Member not found to 'SCRIPT3: Member not found' with .attr(novalidate or aria-nocomplete)

FYI, Microsoft today closed this bug wontfix for IE10, I assume that means it won't get any love until IE11.

At present the best workaround is to not run IE10 in compatibility view. Make sure you have a valid HTML5 doctype on the document.

comment:36 Changed 3 months ago by Dzulqarnain Nasir <dzul1983@…>

Hi guys,

I'm not sure the best way to test for IE7 compatibility is via IE7 mode in IE10. There have been many occasions where I do this, and something breaks in IE10 set to IE7 mode, but works perfectly in IE8 set to IE7 mode.

I suggest you test for IE7 compatibility using IE7 if possible. Set up a virtual machine or something. It's not that hard to do, and if you're actually developing for IE7 (God forbid) then you should be testing in IE7.

In any case, I'm getting this error as well in one of my projects, and I'm running IE8 in IE7 mode on one of my virtual machines.

comment:37 Changed 3 months ago by steveb321

This is frustrating - clearly IE7 mode should match IE7 proper and its no longer doing that.. But having to keep IE7 and IE10 installed in different virtual machines is super irritating to developers...

comment:38 Changed 3 months ago by steveb321

upvote for some sort of fix to this.

comment:39 Changed 2 months ago by anonymous

I get this bug without running compatibility mode. IE10 on Windows 8. The other day it just started happening - I'm assuming when IE10 came out. I can't upvote the bug with the given link.

comment:40 Changed 8 weeks ago by anonymous

I'm getting the same in IE10 on Windows 8

comment:41 Changed 7 weeks ago by silverpaladin1@…

Got the same thing happening, windows 7, ie10 in ie7 browser and document mode.

comment:42 Changed 7 weeks ago by Envvio

Still happening

comment:43 follow-up: ↓ 44 Changed 7 weeks ago by dmethvin

The workaround that I know is to not run IE10 in IE7 mode. If you can't do that then work out a patch or propose a solution and let us know. Adding vague "still happens" comments will just make it harder to see progress here.

comment:44 in reply to: ↑ 43 ; follow-up: ↓ 45 Changed 6 weeks ago by anonymous

please see this jsFiddle example,  http://jsfiddle.net/vespermm/VP2QA/2/

when run IE10 in IE7 mode, use attr('maxLength', 10) for textarea dom, you can see the bug.

it cause by document.createAttribute .

when var rt = docuemnt.createAttribute('maxlength');

rt.value is null.

Replying to dmethvin:

The workaround that I know is to not run IE10 in IE7 mode. If you can't do that then work out a patch or propose a solution and let us know. Adding vague "still happens" comments will just make it harder to see progress here.

comment:45 in reply to: ↑ 44 Changed 6 weeks ago by anonymous

And, it seems only happen when set maxLength on textarea.

if you write this:

$("textarea").attr('maxlength', 10);

run IE10 in IE7 mode, bang...bug happens.....

Replying to anonymous:

please see this jsFiddle example,  http://jsfiddle.net/vespermm/VP2QA/2/

when run IE10 in IE7 mode, use attr('maxLength', 10) for textarea dom, you can see the bug.

it cause by document.createAttribute .

when var rt = docuemnt.createAttribute('maxlength');

rt.value is null.

Replying to dmethvin:

The workaround that I know is to not run IE10 in IE7 mode. If you can't do that then work out a patch or propose a solution and let us know. Adding vague "still happens" comments will just make it harder to see progress here.

comment:46 Changed 5 weeks ago by sanchez_paus@…

Hi,

I was stuck with this for a couple of days.

My problem had to do with qTip trying to set attribuets with names like "aria-something" to an HTML element in IE10 wile on compatiblity mode (IE10 without compatiblity mode works just fine)

I am using jQuery 1.7.1 and updating to the latest jQuery library is just too much work and involves too much testing!

So my workaround for this problem :

		set: function( elem, value, name ) {
			// BUG related to ie10 compatibility mode not possible to set aria-parameters
			// The following problems were in Asynja: qtip didn't work, couldn't save patients by clicking save button and probably more.
			if (name.substring(0,4) == 'aria') {
				return;
			}
			// Set the existing or create a new attribute node
			var ret = elem.getAttributeNode( name );
			if ( !ret ) {
				ret = document.createAttribute( name );
				elem.setAttributeNode( ret );
			}
			return ( ret.nodeValue = value + "" );

		}

This way the "aria-" attributes will be ignored, I am not sure of what the sideeffects of this are, but so far I have not noticed any problem in my web-app.

Hope you find it helpful.

comment:47 in reply to: ↑ 28 ; follow-up: ↓ 52 Changed 5 weeks ago by johnrissone@…

@dmethvin - the MS link you provided to upvote is broken. Would you mind to provide a new one? I'm also seeing this same error when trying to set the attribute 'aria-autocomplete': 'list' on an anchor element (again using IE10 in IE7 browser & document mode). Setting up another machine with IE7 is not ideal (or feasible for some of us). If it is not a jquery bug as you stated, is there a simple workaround we can implement such as some of the ones suggested above? No ones blessed them yet.

Replying to dmethvin:

Please go to the Microsoft bug tracker and vote up this bug:  https://connect.microsoft.com/IE/feedback/details/774078 You may need to register at the site with a Live ID.

Do not post "me toos" here.

comment:48 Changed 5 weeks ago by anonymous

I found a workaround for getting this error when one of my plugins (selectmenu) is attempting to set the value 'aria-autocomplete': 'list' (and I have read it also repros for a few other aria-* attributes (but not all).

The workaround is to apply the problematic attribute ('aria-autocomplete': 'list' in my case) using the .prop method instead of .attr. Seems to work, although I just tried this and not sure of any side effects yet. So far so good though.

Instead of doing this

var ac = $('<a/>', {'aria-autocomplete': 'list'});

I ended up doing this:

var ac = $('<a/>');
ac.prop('aria-autocomplete', 'list');

comment:49 Changed 5 weeks ago by johnrissone@…

I found a workaround for getting this error when one of my plugins (selectmenu) is attempting to set the value 'aria-autocomplete': 'list' (and I have read it also repros for a few other aria-* attributes (but not all).

The workaround is to apply the problematic attribute ('aria-autocomplete': 'list' in my case) using the .prop method instead of .attr. Seems to work, although I just tried this and not sure of any side effects yet. So far so good though.

Instead of doing this

var ac = $('<a/>', {'aria-autocomplete': 'list'});

I ended up doing this:

var ac = $('<a/>');
ac.prop('aria-autocomplete', 'list');

comment:50 follow-up: ↓ 51 Changed 3 weeks ago by Andre P.

Following the advice of  http://msdn.microsoft.com/en-us/library/windows/desktop/ms764615(v=vs.85).aspx

"You can set the value by calling the setAttribute method of the element object."

Change the offending line

ret.value = value += "";

to:

elem.setAttribute(name, value += "");

comment:51 in reply to: ↑ 50 Changed 13 days ago by anonymous

I was getting this error using Kendo UI and this fix works perfectly! Thank you so much!

Replying to Andre P.:

Following the advice of  http://msdn.microsoft.com/en-us/library/windows/desktop/ms764615(v=vs.85).aspx

"You can set the value by calling the setAttribute method of the element object."

Change the offending line

ret.value = value += "";

to:

elem.setAttribute(name, value += "");

comment:52 in reply to: ↑ 47 Changed 5 days ago by bstruthers@…

Replying to johnrissone@…:

The link is not broken. If you cannot see it, you'll need to register with the site and join the IE Feedback Program. Earlier comments make it seem like you only need to register.

@dmethvin - the MS link you provided to upvote is broken. Would you mind to provide a new one? I'm also seeing this same error when trying to set the attribute 'aria-autocomplete': 'list' on an anchor element (again using IE10 in IE7 browser & document mode). Setting up another machine with IE7 is not ideal (or feasible for some of us). If it is not a jquery bug as you stated, is there a simple workaround we can implement such as some of the ones suggested above? No ones blessed them yet.

Replying to dmethvin:

Please go to the Microsoft bug tracker and vote up this bug:  https://connect.microsoft.com/IE/feedback/details/774078 You may need to register at the site with a Live ID.

Do not post "me toos" here.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.