plandem / lwrte

Export from Google Code. Lightweight Rich Text Editor (RTE / WYSIWYG) for jQuery
https://code.google.com/p/lwrte/
0 stars 0 forks source link

$.browser is no longer in jquery #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The $.browser.msie test is no longer possible in the latest jQuery.  LTE errors 
out on the check.

Original issue reported on code.google.com by displague on 18 Jan 2013 at 8:57

GoogleCodeExporter commented 9 years ago
Easy fix.  Add the function below to check if it's IE, and then change the only 
line that's checking $.browser.msie and have it instead check if 
(!browser_is_ie) { ... }

var browser_is_ie = (function(){
    var undef,
        v = 3,
        div = document.createElement('div'),
        all = div.getElementsByTagName('i');
    while (
        div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
        all[0]
    );
    return v > 4 ? v : undef;
}());

Original comment by squ...@gmail.com on 11 Jan 2014 at 9:53