the question is. I test in FF, and if i use keypress, the image move when i have the key pressed, however, in chromium, if i use keypress, nothing happen, but if i use keydown it works in chromium like a keypress
It's very important to check out the links that Kor posted as well - there's a bunch on inconsistencies between browsers with what key registers what code after being called with one event versus another.
Checking out those links will show you a table which will clarify it all.
I've switched careers...
I'm NO LONGER a scientist,
but now a web developer...
awesome.
the question is. I test in FF, and if i use keypress, the image move when i have the key pressed, however, in chromium, if i use keypress, nothing happen, but if i use keydown it works in chromium like a keypress
a bit strange
Can you post a full code (HTML included), please? Or a link to a test page? HTML code is important in relationship with the JavaScript code.
And. once again: do you know that you try an HTML5 feature? Do you know something about the history of HTML, XHTML, JavaScript and all the cross-browser's problems all these years so far?
at the moment i don't have any server, and it is much code to post (more than 500lines and 4 files ).
I used the keydown, and it is solved more or less
Yes i know that is html5, and i have some knowledge about programming. Yes it is true, the interoperability in the differents browsers are a big problem for all developers
You could attach the files. Or you could isolate the representative HTML part of the code and post it (but, most of the time the full picture is important - some unexpected small errors in one of the part of the code can spoil something it it opposite part of it )
It is hard for us to reproduce the error, if we have not enough information. Merely when it comes about cross-browser issues.
Bookmarks