Roundup Tracker - Issues

Issue 877504

classification
help_controls.jshas browser check for IE only
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : dfaure_kde, richard
Priority: normal :

Created on 2004-01-15 11:55 by dfaure_kde, last changed 2004-01-17 01:51 by richard.

Messages
msg1086 Author: [hidden] (dfaure_kde) Date: 2004-01-15 11:55
Take a bug with nosy's or topic's listed and click on 
the corresponding (list)  
link. In the help dialog that opens, the lists are 
implemented in Javascript. 
 
The JS code for this includes a browser check, 
which tests for IE, and then does: 
 
// add the pop() and push() method to Array 
prototype for old IE browser 
if (bName() == 1 && bVer() >= 5.5); 
else { 
    Array.prototype.pop = pop; 
    Array.prototype.push = push; 
} 
 
This breaks in Konqueror due to a konqueror bug 
("pop" would then appear when enumerating an 
array), which is how I got to look at this code. 
 
We'll fix it, but I'm also filing a bug report here 
because hardcoded browser checks are always 
wrong, they do not take into account all the other 
browsers out there. 
 
Better check if the browser knows pop, and add it if 
not, without hardcoded check for IE>=5.5 
This could be done simply with 
 
if (!Array.prototype.pop) { Array.prototype.pop = 
pop; }  
if (!Array.prototype.push) { Array.prototype.push = 
push; }  
 
msg1087 Author: [hidden] (richard) Date: 2004-01-17 01:51
Logged In: YES 
user_id=6405

 
History
Date User Action Args
2004-01-15 11:55:04dfaure_kdecreate