Changeset 2053 for FCKeditor/trunk


Ignore:
Timestamp:
06/11/2008 09:36:17 AM (6 years ago)
Author:
martinkou
Message:

Fixed #2218 : Improved Gecko based browser detection to accept Epiphany/Gecko as well.

Location:
FCKeditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/_whatsnew.html

    r2052 r2053  
    121121                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2066">#2066</a>] Added a workaround for a Mac 
    122122                        Safari 3.1 browser bug which caused the Fit Window button to give a blank screen.</li>  
     123                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2218">#2218</a>] Improved Gecko based browser 
     124                        detection to accept Epiphany/Gecko as well.</li> 
    123125        </ul> 
    124126        <h3> 
  • FCKeditor/trunk/editor/_source/internals/fckbrowserinfo.js

    r1629 r2053  
    2929        IsIE7           : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 7 ), 
    3030        IsIE6           : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 6 ), 
    31         IsGecko         : s.Contains('gecko/'), 
    3231        IsSafari        : s.Contains(' applewebkit/'),          // Read "IsWebKit" 
    3332        IsOpera         : !!window.opera, 
     
    3938(function( browserInfo ) 
    4039{ 
     40        browserInfo.IsGecko = ( navigator.product == 'Gecko' ) && !browserInfo.IsSafari && !browserInfo.IsOpera ; 
    4141        browserInfo.IsGeckoLike = ( browserInfo.IsGecko || browserInfo.IsSafari || browserInfo.IsOpera ) ; 
    4242 
    4343        if ( browserInfo.IsGecko ) 
    4444        { 
    45                 var geckoVersion = s.match( /gecko\/(\d+)/ )[1] ; 
     45                var geckoMatch = s.match( /rv:(\d+\.\d+)/ ) ; 
     46                var geckoVersion = geckoMatch && parseFloat( geckoMatch[1] ) ; 
    4647 
    4748                // Actually "10" refers to Gecko versions before Firefox 1.5, when 
     
    5253                // be 1.7 (we are assuming that rv < 1.7 will not have build > 20051111). 
    5354 
    54                 // TODO: Future versions may consider the rv number only, but it is 
    55                 // still to check that all Gecko based browser present the rv number. 
    56                 browserInfo.IsGecko10 = ( ( geckoVersion < 20051111 ) || ( /rv:1\.7/.test(s) ) ) ; 
    57                 browserInfo.IsGecko19 = /rv:1\.9/.test(s) ; 
     55                if ( geckoVersion ) 
     56                { 
     57                        browserInfo.IsGecko10 = ( geckoVersion < 1.8 ) ; 
     58                        browserInfo.IsGecko19 = ( geckoVersion > 1.8 ) ; 
     59                } 
    5860        } 
    59         else 
    60                 browserInfo.IsGecko10 = false ; 
    6161})(FCKBrowserInfo) ; 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy