AnanthaKN / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

jQuery 1.9 incompatibility with browser detection #132

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
jQuery 1.9 favours feature-detection over browser-detection. To work around 
that, add the following lines after $.fn.editInPlace is defined:

  jQuery.browser = {};
  jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase());
  jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
  jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
  jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());

Original issue reported on code.google.com by dave.jar...@gmail.com on 8 Jun 2013 at 2:23

GoogleCodeExporter commented 9 years ago
And for safari:

  jQuery.browser.safari = navigator.userAgent.indexOf("Safari") > -1;

Original comment by dave.jar...@gmail.com on 8 Jun 2013 at 2:26