Posts tagged as ' Chrome Bug ' ...

22 Nov 2009 @ 7:38 PM 

Hello

Did you knew that Google Chrome does not understand keypress() on special keys like arrow keys/esc/enter/etc ?

Me neither

I was trying to get the following code to work and it didnt work in Google Chrome at all

    $(window).keypress(function(e){
        var code = (e.keyCode ? e.keyCode : e.which);
        if (code == 32 || (65 < = code && code <= 65 + 25) || (97 <= code && code <= 97 + 25)) {
           alert("haxxor");
        }
  $(window).keypress(function(el){
        var alphaCode = (el.keyCode ? el.keyCode : el.which);
        if (alphaCode == 37) {
            alert("left key");
        }
        if (alphaCode == 39) {
             alert("right key")
        }

        if ( alphaCode == 13) {
            alert ("enter key")
        }
        if ( alphaCode == 27) {
            alert ("escape key")
        }      
    });

+ Continue Reading This Article

Tags

Tags: , ,

Categories: jQuery

Posted By: Dinulescu Alexandru Adrian

Last Edit: 08 Jan 2010 @ 08:43 PM

EmailPermalinkComments (0)

27 May 2009 @ 10:26 AM 

Hello

While i was building a webpage for a client, i came across a very peculiar issue. It seems that webkit (safari/google chrome) have troubles understanding an absolutely positioned floated element

This is the HTML for the file in question.

<ul>
     <li class="selected"><a href="#"><span>Ficha Tecnica</span></a></li>
     <li><a href="#"><span>Ubiccaon Y Aroso</span></a></li>
     <li><a href="#"><span>Galeria De l'image</span></a></li>
     <li><a href="#"><span>Pricipaples operandos</span></a></li>
     <li class="last"><a href="#"><span>Mas Information</span></a></li>
</ul>
<div class="clear"></div>
<div class="stuff">
Relative Positioned Stuff Goes here
</div>

+ Continue Reading This Article

Posted By: Dinulescu Alexandru Adrian

Last Edit: 07 Jan 2010 @ 11:22 PM

EmailPermalinkComments (0)