Use different tactic to sniff for Opera in order to avoid false positives in IE. [#176 state:resolved]
This commit is contained in:
parent
7444a4ad02
commit
5ddfad8a62
|
@ -1,3 +1,5 @@
|
|||
* Use different tactic to sniff for Opera in order to avoid false positives in IE. [Tobie Langel, jddalton]
|
||||
|
||||
* Rename variable in Form.Element.Serializers.select. (jddalton)
|
||||
|
||||
* Coerce Opera's version string into a number whenever we need to sniff. (Sam Holman, jddalton)
|
||||
|
|
|
@ -457,7 +457,7 @@ Element.Methods = {
|
|||
element.style.position = 'relative';
|
||||
// Opera returns the offset relative to the positioning context, when an
|
||||
// element is position relative but top and left have not been defined
|
||||
if (window.opera) {
|
||||
if (Prototype.Browser.Opera) {
|
||||
element.style.top = 0;
|
||||
element.style.left = 0;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,12 @@ var Prototype = {
|
|||
Version: '<%= PROTOTYPE_VERSION %>',
|
||||
|
||||
Browser: {
|
||||
IE: !!(window.attachEvent && !window.opera),
|
||||
Opera: !!window.opera,
|
||||
IE: !!(window.attachEvent &&
|
||||
navigator.userAgent.indexOf('Opera') === -1),
|
||||
Opera: navigator.userAgent.indexOf('Opera') > -1,
|
||||
WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
|
||||
Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
|
||||
Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
|
||||
navigator.userAgent.indexOf('KHTML') === -1,
|
||||
MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue