FCKEditor bug fix for IE10

IE 10 is the first browser where the major version number (before the dot) is in double digits. Most scripts, including the one written for FCKEditor at the time had a browser detection regex pattern that expected only a single digit before the dot (see below)

var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;

The following change will thankfully remediate the situation immediately.

var sBrowserVersion = navigator.appVersion.match(/MSIE ([\d.]+)/)[1] ;

Credit for the above script goes to the author in answer to a stackoverflow question (http://stackoverflow.com/questions/1926394/get-browser-version-of-ie-using-javascript)


6 thoughts on “FCKEditor bug fix for IE10

  1. Uh, IE 10 isn’t the first browser with this. Firefox is on version 17, Chrome is on version 23. I think you meant to say the first IE version in the double digits.

  2. Hi There. This worked for me however it doesn’t fix the issue with filemanager do you have a fix for this?? PLEASE lol

  3. This is not working with ie11.But press f12 and change user agent string to ie8,ie9,ie10 it is working.
    Are there any method to change user agent string from javascript?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s