joseph / Monocle

A silky, tactile browser-based ebook JavaScript library.
http://monocle.inventivelabs.com.au
MIT License
743 stars 200 forks source link

IE8 and IE7 #26

Closed jakobholmelund closed 13 years ago

jakobholmelund commented 13 years ago

Hi.. I found the closed issue on this, but wanted to make shure i understood correctly. You said there is no plans to make monocle compatible with older versions of IE, but how about IE8 ? After i switched to the componentry branch it's not working in IE8 anymore.. Not even with the legacy flipper. Is this intended ? My current solution requires me to support IE7 and IE8 but does not have to be full featured, so that ie7 and ie8 should be able to load, but can live with just a scrollbar or something that enables you to see the contents of the book.

So.. If there is no support i guess i'll have to make it myself.

@joseph Do you have some advise on how i go about this. Im a fairly advanced js-dev, but any pointers to where i have to start would be great

joseph commented 13 years ago

The legacy flipper is expected to work in IE, but I no longer test it regularly. I don't have any interest in IE compatibility until it supports the W3C that core Monocle depends on — for Booki.sh we just serve ChromeFrame to IE users.

Still, I'd be delighted to accept patches that provide IE compat. These should be designed so as not to affect performance in real browsers. Src/dimensions/vert.js is a good place to start.

jakobholmelund commented 13 years ago

Hmm after looking a bit into the problem it seems that the problems run deep.. I must state that i really really really hate microsoft for its implementation of W3C, these days i can't think of anything i hat more actually..

The problems already starts in component.js, where almost all the iframe stuff isn't suppoerted in IE, so i think the first task is to write LoadFrame function that is supported in IE. For example loadFrameFromNodes does not work and u suspect more doesnt work. Actually i think it might work after this.. I'll let you know how it goes..

jakobholmelund commented 13 years ago

I think i found a bug.. in events.js line ca. 55

var target = evt.target || window.srcElement;

should be

var target = evt.target || evt.srcElement;

joseph commented 13 years ago

Thanks, I've incorporated this into another fix which I'll push shortly.

joseph commented 13 years ago

Oh wait, I already pushed it: 256b76dd1e012f19972903cb6fe02dcacfdd2908

jakobholmelund commented 13 years ago

Glad to help. I'm feeling im kind of on the brink of cracking the IE-support. My problem right now is that it never loads the callback-function given to Monocle.Reader(node,data,opts,callback); It's kind of frustrating that IE wont even give me an error. It just loads the reader with iframe and stuff, and even the stuff on the first page. But all i see is a blank page, kind of like with the webkit bug. Only this time the flipper doesn't work i've made sure it loads the Legacy flipper but it just wont show. Do you have any idea of what could be wrong ?

jakobholmelund commented 13 years ago

I think i found something.. the event dispatcher isn't written to support IE

jakobholmelund commented 13 years ago

GOD I HATE Internet Explorer ! I'm 2 secs away from throwing my laptop out the window and just jell !!! AAARRRGH. Well, it seems that IE chose not to support custom events, or at least the ability to fire custom events.. So, now it seems that the only way is to write a new eventhandler with crossbrowser compat..

joseph commented 13 years ago

Yeah, that's right. I used to have a comment in the source to this effect; I guess I cleaned it out.

Essentially you have to write an entirely custom event registry just to support IE. I think jQuery does something like that, but it's an ugly hack (with that originalEvent nonsense). I dunno. Every time I look at IE support — even IE9, which has W3C events but still no CSS2 columns — I come back to thinking that just making IE users install a plugin (ChromeFrame) is the best solution.

I don't think I'll change that view until Windows Phone has a significant market share.

jakobholmelund commented 13 years ago

I was thinking. Could you maybe make a very very simplified view for IE browsers ? Actually a scrollable iframe would be just fine :P I have spent hours trying to fix IE compatability now, and the problems just keep popping up, som im kind of giving up on this.. And my next solution is to not use monocle at all when viewing the book in IE

mfshiu commented 12 years ago

I got below message in IE (with Chrome Frame) dialogbox:

Line: 691 Error: Unable to get value of the property 'getElementsByTagName': object is null or undefined

My Test Url: http://monocle.inventivelabs.com.au/static/scripts/src/test/bookdata/index.html