arsava / dokuwiki-template-vector

"vector" brings you the MediaWiki/Wikipedia 2010 look and feel for DokuWiki.
http://www.dokuwiki.org/template:vector
GNU General Public License v2.0
38 stars 9 forks source link

edittable + vector + internet explorer = error #42

Open An-dir opened 9 years ago

An-dir commented 9 years ago

Hello,

I'm trying to implement "edittable" wiki in dokuwiki with "vector" template installed. every user with internet explorer (only tested version 11 on different computers) is not able to use the edittable plugin. if i use any other browser it seems to work. it also works if i don't use vector template. it doesn't work even if i try it with "Development Snapshot". for that testing i started a brand new dokuwiki with the microapache that can be builtin within a new download. manually downloaded and installed the vector and edittable plugin.

Debugger of IE warns that there is an error in the /lib/exe/js.php "if(rowHeaders.length){var TH=this.instance.wtTable.TABLE.querySelector" >> "Object doesn't support property or method 'querySelector'"

As described on the following site, IE with document mode set to "7" gets that problem. http://stackoverflow.com/questions/25632927/object-doesnt-support-property-or-method-queryselector-shows-when-accessing

manually switching the document mode in emulation settings, solves the problem.

the following code lines (main.php and mediamanager.php) seem to fix problems with IE but prevent working with ie 11 & edittable

//- http://blog.andreas-haerter.com/2010/05/28/fix-msie-8-auto-scroll-textarea-css-width-percentage-bug //- http://msdn.microsoft.com/library/cc817574.aspx if ($ACT === "edit" && !headers_sent()){ header("X-UA-Compatible: IE=EmulateIE7"); }

SOLUTION: if ($ACT === "edit" && !headers_sent()){ $IE8 = (ereg('MSIE 8',$_SERVER['HTTP_USER_AGENT'])) ? true : false; if ($IE8 == 1) { header("X-UA-Compatible: IE=EmulateIE7"); } else { header("X-UA-Compatible: IE=edge"); } }

so still "edittable + vector + internet explorer 8 = error" but newer versions could do it now.