Forums
View unanswered posts | View active topics It is currently Sun Dec 21, 2014 11:59 am



Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
 Using PIE for IE8 only 
Author Message

Joined: Tue Oct 19, 2010 10:40 am
Posts: 40
Post Using PIE for IE8 only
After a few days of trying to fix bugs that were created with implementing PIE for IE7, I have decided to use DD_Roundies for IE6&7 and use PIE for IE8.

With this, the websites are spectacular. Besides some minor positional differences, they are nearly identical.

My question is what is the best way to remove PIE functionality if the browser is IE6 or 7?

Is it as easy as setting the behavior to none with javascript or is there a more preferable method?

Hopefully this is only a temporary solution and the problems I am having will go away with PIE's next release :D

Thanks


Tue Oct 26, 2010 6:30 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1448
Post Re: Using PIE for IE8 only
If you have to do this, I'd suggest putting the behavior property in a style rule using a selector only IE8 recognizes.

What are the bugs you mention? Have you reported them? If not I wouldn't bet on them getting fixed. I see you've posted in the forum before but it sounded like you got it working.


Tue Oct 26, 2010 10:59 am
Profile

Joined: Tue Oct 19, 2010 10:40 am
Posts: 40
Post Re: Using PIE for IE8 only
I am having two problems:

One is a zoom issue with IE7 that has all ready been reported. I have a table (sigh) of buttons, each with a background image.

When I zoom, the background of the buttons are completely off. They are horizontally aligned, but not vertically, not even close. Been working on it for quite awhile and not sure what is going on. Sadly I can't post any code.

Another bug, again only related to IE7, is I have an accordion list. When I open this list, the background expands as expected. But when I have to open the list when it isn't loaded, I go to the correct page, and the list expands, but the background does not. The interesting part is it works just fine with IE8. Again, can't post any code.

As I have said, CSS3PIE is working perfectly for IE8, so I think that using both will be a perfect solution for me.

Thank you very much for PIE, solved two dozen bugs in 2 minutes.

~

EDIT: I just looked deeper in the zoom issue with the buttons. I noticed it wasn't happening with all of them, so I thought it was a CSS3PIE issue with tables. I then noticed that the buttons that worked correctly were wrapped in a span that set the position to relative ( the buttons positions are set to relative in the css file as well). So, I wrapped the infected buttons with the same span and it worked like a charm. I tried to simply wrap them in a span, as I did to fix most of the bugs, but that did not work, so I'm curious as to why this did.


Tue Oct 26, 2010 11:07 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1448
Post Re: Using PIE for IE8 only
It sounds like these are issues related to IE not firing onmove/onresize events at the proper times. PIE listens to those events so it knows when to move/resize the background elements to stay in sync. Unfortunately it seems sometimes IE doesn't fire these events when it should. :| IE8 is actually the worst offender in this regard, so I put in a nasty hack that basically polls a few times a second and checks if each element has moved or not. It's probably because of this hack that you're seeing IE8 work better. I was hoping not to have to add the hack to IE6 & 7 but maybe I need to after all. Or maybe I can make it optional, controlled by a -pie-* custom css property, and disabled by default.

As you've seen, wrapping it in a position:relative element also helps because then the element is no longer moving relative to its positioning container, and no update is required. I'll add this to the troubleshooting guide i'm working on.

Anyway, thanks for the info, it helps a lot. I'll see if I can do something about this for beta3.


Wed Oct 27, 2010 8:42 am
Profile

Joined: Tue Oct 19, 2010 10:40 am
Posts: 40
Post Re: Using PIE for IE8 only
The object is resizing due to JQuery's scrollDown method, so to fix the issue, I am removing the behavior at the beginning of the call and putting the behavior back in after scrollDown is complete. Of course I only do this when I need try to open the menu when it is not loaded, so it only occurs for a very specific case, but a hack is a hack :(

If you have a better temporary solution, please let me know. I would like to start testing this with XP, though with previous posts, I am a little afraid. :(

With the crash issues I've been reading with XP, I don't think it will be pretty. Worst case scenario, I would use DD_Roundies as my original post said. That solution does work perfectly fine, I would just like to avoid it.

Thanks

~


Wed Oct 27, 2010 8:51 am
Profile

Joined: Tue Oct 19, 2010 10:40 am
Posts: 40
Post Re: Using PIE for IE8 only
Ahh.. I took a look at your source code and I see what you are saying about the heartbeat hack, and you weren't kidding about it being a hack :D

But I would expect changing that bit of code to check for all versions would probably fix my problem, though I am still looking for a better solution, but no luck so far.

I will let you know if I find anything.

~

Edit: I changed the htc to allow the heartbeat to work for all versions and it did fix the problem.


Thu Oct 28, 2010 8:59 am
Profile

Joined: Wed Oct 06, 2010 2:38 am
Posts: 10
Post Re: Using PIE for IE8 only
Anathema wrote:
Edit: I changed the htc to allow the heartbeat to work for all versions and it did fix the problem.


Please could you post up the code change


Mon Nov 08, 2010 3:19 am
Profile

Joined: Tue Oct 19, 2010 10:40 am
Posts: 40
Post Re: Using PIE for IE8 only
Sure!

The code change was to the uncompressed version with the latest release(not from source code)

The changes were....

Line 42: if( PIE.ie8DocMode === 8 ) { ::: //if( PIE.ie8DocMode === 8 ) {

Line 65: } ::: //}

Line 2987: if( PIE.ie8DocMode === 8 ) { ::: //if( PIE.ie8DocMode === 8 ) {

Line 2989: } ::: //}

Line 3052: if( PIE.ie8DocMode === 8 ) { ::: //if( PIE.ie8DocMode === 8 ) {

Line 3054: } ::: //}



And thats it. Now, instead of checking which version of IE you are using, it will add the heartbeat no matter what.
Pretty easy change.

~


Mon Nov 08, 2010 7:30 am
Profile

Joined: Wed Oct 06, 2010 2:38 am
Posts: 10
Post Re: Using PIE for IE8 only
Thanks for that.

Jason, will you be including that code in the next release to fix issues such as this


Wed Nov 10, 2010 4:07 am
Profile

Joined: Tue Oct 19, 2010 10:40 am
Posts: 40
Post Re: Using PIE for IE8 only
I am unsure as to how the code change would fix the zoom issue. The issue I solved with that code change was different than the zoom issue I was having. I am interested to know if it does fix the problem, but I don't expect it to.

Then again, I know nothing as to how IE deals with zooming, so I may be way off. But how I fixed my zooming issues was wrapping the infected objects with a span or div that set the position to relative, and all worked perfectly.

Any info, Jason? ;)


Wed Nov 10, 2010 8:55 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: Baidu [Spider], Exabot [Bot], Google [Bot], Yahoo [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.