X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fenv.js;h=9f1f6d65ea20b799f7c9ea51bf7b1a04deddd988;hb=3fe9cac293e090ea459a3ee10d78cbe9e1dd0e03;hp=9b73aead51359d973f06cae75bf90a36e02097f8;hpb=f0610347140239143439a511ee2bd48cb784f470;p=ckeditor.git diff --git a/_source/core/env.js b/_source/core/env.js index 9b73aea..9f1f6d6 100644 --- a/_source/core/env.js +++ b/_source/core/env.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -86,6 +86,15 @@ if ( !CKEDITOR.env ) mobile : ( agent.indexOf( 'mobile' ) > -1 ), /** + * Indicates that CKEditor is running on Apple iPhone/iPad/iPod devices. + * @type Boolean + * @example + * if ( CKEDITOR.env.iOS ) + * alert( "I like little apples!" ); + */ + iOS : /(ipad|iphone|ipod)/.test(agent), + + /** * Indicates that the browser has a custom domain enabled. This has * been set with "document.domain". * @returns {Boolean} "true" if a custom domain is enabled. @@ -239,7 +248,12 @@ if ( !CKEDITOR.env ) * alert( "Your browser is pretty cool!" ); */ env.isCompatible = + + // White list of mobile devices that supports. + env.iOS && version >= 534 || + !env.mobile && ( + ( env.ie && version >= 6 ) || ( env.gecko && version >= 10801 ) || ( env.opera && version >= 9.5 ) || @@ -275,6 +289,9 @@ if ( !CKEDITOR.env ) if ( env.quirks ) env.cssClass += ' cke_browser_iequirks'; + + if ( document.documentMode && document.documentMode >=9 ) + env.cssClass += ' cke_browser_ie9plus'; } if ( env.gecko && version < 10900 )