Bug 5862 - Incompatibility in ajax.js with "localName" for Internet Explorer
Summary: Incompatibility in ajax.js with "localName" for Internet Explorer
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Browser compatibility (show other bugs)
Version: rel_3_2
Hardware: All All
: P5 - low normal (vote)
Assignee: Vicente Seguí Serrán
QA Contact: Bugs List
URL:
Keywords:
: 6010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-14 08:47 UTC by Vicente Seguí Serrán
Modified: 2012-10-25 23:03 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Use "nodeName" for IE (2.48 KB, patch)
2011-03-14 09:04 UTC, Vicente Seguí Serrán
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vicente Seguí Serrán 2011-03-14 08:47:48 UTC
It has been detected an incompatibility with Internet Explorer in the ajax.js file that cause a javascript error for this browser that prevents proper operation.

The error is located in the lines:

40              switch ( this.localName.toLowerCase() ) {
65              switch ( this.localName.toLowerCase() ) {

The error occurs because the "localName" is not supported by Internet Explorer and returns "undefined".
Comment 1 Vicente Seguí Serrán 2011-03-14 09:04:23 UTC
Created attachment 3291 [details] [review]
Use "nodeName" for IE

The solution is based on detecting this behavior that occurs in Internet Explorer and use "nodeName", which is equivalent to "localName" for Internet Explorer.

Ajax.js file will be modified as follows:

40              var selector_type = this.localName;
                if (selector_type == undefined) selector_type = this.nodeName; // IE only
                switch ( selector_type.toLowerCase() ) { 
                
67              var selector_type = this.localName;
                if (selector_type == undefined) selector_type = this.nodeName; // IE only
                switch ( selector_type.toLowerCase() ) {
Comment 2 Owen Leonard 2011-03-18 15:00:50 UTC
Some additional information required to properly test this patch:

 - ajax.js is used in one place, preferences.pl in the staff client
 - If Internet Explorer is configured to prompt you on JavaScript errors, it will give you an alert when you load the preferences page:

"Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
Timestamp: Fri, 18 Mar 2011 14:59:12 UTC


Message: Expected identifier, string or number
Line: 11
Char: 9
Code: 0
URI: /intranet-tmpl/prog/en/js/ajax.js"
Comment 3 Chris Cormack 2011-03-20 23:01:06 UTC
Pushed, please test
Comment 4 Frédérick Capovilla 2011-03-31 22:01:03 UTC
*** Bug 6010 has been marked as a duplicate of this bug. ***