Opened 9 years ago
Closed 8 years ago
#13059 closed defect (fixed)
dojo.byId(domnode.getAttribute('aria-activedescendant')) error in IE
Reported by: | liucougar | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Core | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
In EmulateIE7 mode of both IE9 and IE8, if a domnode has no 'aria-activedescendant' specified, the following will lead to error:
dojo.byId(domnode.getAttribute('aria-activedescendant'))
in IE9 EmulateIE7 mode, the error is "Invalid procedure call or argument"
in IE8 EmulateIE7 mode, the error is "Invalid argument."
the problem seems to stem from the fact that, in IE8/IE9, some sort of aria support is included, so domnode.getAttribute('aria-activedescendant') would return a empty string if no 'aria-activedescendant' is specified, however, this empty string is special: it will lead to the above error in IE8/IE9
by adding a check for empty string in dojo.byId, this can be solved
NOTE: this error does not happen in real IE7, nor in native IE8 mode, nor in EmulateIE8 mode in IE9 and native IE9 mode
proposed patch:
-
../svn/dojo/_base/html.js
55 55 if(typeof id != "string"){ 56 56 return id; 57 57 } 58 var _d = doc || dojo.doc, te = _d.getElementById(id);58 var _d = doc || dojo.doc, te = id && _d.getElementById(id); 59 59 // attributes.id.value is better than just id in case the 60 60 // user has a name=id inside a form 61 61 if(te && (te.attributes.id.value == id || te.id == id)){
Change History (3)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
comment:3 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
looks good to me