28 Dec 2009 @ 6:28 PM

Hello

After working on the google shortcuts for a while, i decided to open up IE 8 and see if the application works or not. I was surprised and started to do the old alert("hax") thing every dozen lines. The problem is with the $(window).keypress(function(e){}). It seems that IE doesnt understand at all the $(window) property at all when it comes with keypress/keydown/keyup events.

After some research, this is a known issue from IE5 days, which is quite weird that jQuery didnt fix it in a way so it works with $(window)

However i did check the width/height properties and both values return different values.

jQuery

        // instead of $(window).keypress(function(){});
        // use
        $(document).keypress(function(){});
        // this is the testing
    var windowH = $(window).height();
    var windowW = $(window).width();
    var documentH = $(document).height();
    var documentW = $(document).width();
    alert(windowH);
    alert(documentH);
    alert(windowW);
    alert(documentW);

I did look over this issue over Google but I couldnt find any information about it. Really sad you know.

Tags

Tags: , ,

Categories: IE6 Bugs, jQuery

Posted By: Dinulescu Alexandru Adrian

Last Edit: 07 Jan 2010 @ 06:17 PM

EmailPermalink

Responses to this post » (None)

You must be logged in to post a comment.