sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

Issue with Xinha Initialization in IE 11.0 (Trac #1620) #1620

Closed sleemanj closed 3 years ago

sleemanj commented 10 years ago

Due to the very different User Agent String provided by IE Xinha initialization fails at

Line 198 of XinhaCore.js

Xinha.is_ff2 = false ; // Xinha.is_real_gecko && parseInt(navigator.productSub.substr(0,10), 10) < 20071210;

In IE 11 it will reach this line and then fail with unable to get property substr of productSub, which then causes the rest of the Xihna initialization to fail. I guess the fix is to text for the presence of navigator.productSub before attempting to invoke it..

Reported by guest, migrated from http://trac.xinha.org/ticket/1620

sleemanj commented 10 years ago

guest commented:

I can be contacted at mark.drake@golden-hind.com or mark.drake@oracle.com

sleemanj commented 10 years ago

guest commented:

Quick and Dirty Workaround..

Xinha.is_ff2 = false ; try { // Quick Hack to allow initialization to succeed in IE 11.0. Xinha.is_ff2 = Xinha.is_real_gecko && parseInt(navigator.productSub.substr(0,10), 10) < 20071210; } catch (e) {}

sleemanj commented 10 years ago

This fix, or something like it, is in trunk and IE 11 initialises OK.

Calling it fixed.