⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Grocery Crud and IE8



saulimus
  • profile picture
  • Member

Posted 19 July 2012 - 09:38 AM

[b](UPDATE: Found fix! See last post)[/b]

Hi,

I'm unable to get select dropdowns (jQuery UI Chosen plugin) to work with IE8 (NOT in compatibility mode).
To make sure it wasn't because of anything I did, I installed a fresh CI and the newest GroceryCrud v.1.2.3.
Interestingly enough, the example at http://www.grocerycr..._management/add works with IE8!
So I guess that it used to work but not anymore.
Any suggestions? :unsure:

saulimus
  • profile picture
  • Member

Posted 25 July 2012 - 13:00 PM

Ok, an update. I found out that IE8 uses IE7 compatible mode for all intranet websites regardless of what mode the site says IE should use. (using the meta X-UA-Compatible tag)
Apparently the only workaround is to go to Tools -> Compatibility View Settings and disable the option to use compatibility mode for intranet websites.

More info:
IE 8 Compatibility - Meta Tags, Http Headers, User Agent Strings etc etc

saulimus
  • profile picture
  • Member

Posted 14 August 2012 - 12:32 PM

Another update!
Found the code for fixing the issue. It hasn't been included in the official version yet, but you can easily modify the file yourself.
https://github.com/h...hosen/pull/751/
First edit assets\grocery_crud\js\jquery_plugins\jquery.chosen.js and change this line: (line 284 in the version I have)

if ($.browser.msie && ($.browser.version === "6.0" || $.browser.version === "7.0")) {

To:

if ($.browser.msie && ($.browser.version === "6.0" || ($.browser.version === "7.0" && document.documentMode === 7))) {

Next, because GC uses the minified (compressed) version of the js, go to for example
http://marijnhaverbeke.nl/uglifyjs/ and encode the file, rename it to jquery.chosen.min.js and overwrite the old one.