Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edittable + vector + internet explorer = error #42

Open
An-dir opened this issue Mar 8, 2015 · 0 comments
Open

edittable + vector + internet explorer = error #42

An-dir opened this issue Mar 8, 2015 · 0 comments

Comments

@An-dir
Copy link

An-dir commented Mar 8, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant