public
Description: Prototype JavaScript framework
Homepage: http://prototypejs.org/
Clone URL: git://github.com/sstephenson/prototype.git
Use different tactic to sniff for Opera in order to avoid false positives 
in IE. [#176 state:resolved]
Thu Jul 17 13:22:18 -0700 2008
commit  9f00912b52125f3bdaee4aa544a885a1cae993e0
tree    228aee29b7eb48c94122782aab50f0cf3786b36e
parent  76e6f9fa46e45c8131d549621684a3d473ba0653
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+* Use different tactic to sniff for Opera in order to avoid false positives in IE. [Tobie Langel, jddalton]
0
+
0
 * Optimize Function#bind and Function#bindAsEventListener to avoid using Array#concat when only the context argument is given. [kangax]
0
 
0
 * Ensure Selector.handlers.id finds the proper element even when it's not attached to the document. [jddalton]
...
475
476
477
478
 
479
480
481
...
475
476
477
 
478
479
480
481
0
@@ -475,7 +475,7 @@ Element.Methods = {
0
       element.style.position = 'relative';
0
       // Opera returns the offset relative to the positioning context, when an
0
       // element is position relative but top and left have not been defined
0
- if (window.opera) {
0
+ if (Prototype.Browser.Opera) {
0
         element.style.top = 0;
0
         element.style.left = 0;
0
       }
...
4
5
6
7
8
 
 
 
9
10
 
 
11
12
13
...
4
5
6
 
 
7
8
9
10
 
11
12
13
14
15
0
@@ -4,10 +4,12 @@ var Prototype = {
0
   Version: '<%= PROTOTYPE_VERSION %>',
0
   
0
   Browser: {
0
- IE: !!(window.attachEvent && !window.opera),
0
- Opera: !!window.opera,
0
+ IE: !!(window.attachEvent &&
0
+ navigator.userAgent.indexOf('Opera') === -1),
0
+ Opera: navigator.userAgent.indexOf('Opera') > -1,
0
     WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
0
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
0
+ Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
0
+ navigator.userAgent.indexOf('KHTML') === -1,
0
     MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
0
   },
0
 

Comments

    No one has commented yet.