the dynkeyevent.js file has this method:
DynKeyEvent._keyEventListener=function(e)
and this lines:
if(evt.defaultValue==false) {
if(e.cancelBubble) e.cancelBubble=true;
if(e.stopPropagation) e.stopPropagation();
}
I think it should be:
if(evt.defaultValue==false) {
if(evt.cancelBubble) e.cancelBubble=true;
if(evt.stopPropagation) e.stopPropagation();
}
note the evt instead of the e.
I changed on my code and worked.
The goal? allow one to disable propagation of of key
events to the higher hierarchy allowing one to "eat" the
keys inside a widget. That's how I found out and fixed it.
I have many more fixes too. How should I do it?
Fausto.
Logged In: YES
user_id=1351973
I am using IE6/7 and Firefox 1.06. DynAPI 3 Beta 2.
Logged In: YES
user_id=706287
Hi. Have you tested in older browsers to see if it works?
I've got IE6 and Firefox 1.0.7 right now. Does there exist
an example or can you modify an existing one, or create one
from scratch, to demonstrate the problem and the usage you
expect? Then attach those files to the bug report.
I'd like to see a complex key event example (maybe the game
by Raymod / xwisdom is good), with many levels of layers
inside a few widgets, and tested in some other browsers.
With some things, I just don't know if it was coded wrong
initially, or if it was coded that way to specifically work
with the browsers at the time it was originally written or
last modified.
But, looking at 'if (e.cancelBubble) e.cancelBubble=true;'
makes little sense. If it's true, set it to true is
pointless, so perhaps that was a typo. Which maybe leads to
the second 'if (e.stopPropagation) e.stopPropagation()'
being a typo. But as that's a function, it may just be a
valid check to see if it exists before calling. Hmm, but
no, it should exist, so checking would be an error. I'm
inclined to accept the patch, but I want to understand it
better to be sure.
Well, about other bugs or patches, please continue to refer
to CVS HEAD. Also, it would be great if you could use diff
or diff -u or at the very least include the range of lines
that some code is located. It just makes it easier. And as
always, attach the patch here or in Patches (no real need to
duplicate, I think here would be better). And yes, examples
would be good, something that could exist or if newly
created, be added to the current examples. Get two things
done at once. ;-).