You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Emmy Alex <ea...@hermes.tietronix.com> on 2007/06/17 03:39:18 UTC
batik 1.6 - 1.7 beta1 migration keydown eventhandler issue
Hello,
I seem to have a problem in batik 1.7 beta1 version. This used to work just fine in batik 1.6. I verified this fact using batik-squiggle browser.
My svg which I have stripped down to showcase the problem has the code as shown below:
***************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="text/ecmascript" contentStyleType="text/css" height="100%" onload="loaded(evt);" preserveAspectRatio="xMinYMin meet" version="1.0" viewBox="0 0 800 600" width="100%" zoomAndPan="magnify">
<title>Test</title>
<defs>
<script type="text/ecmascript">
function loaded(evt) {
svgDoc = evt.target.ownerDocument;
svgDoc.documentElement.addEventListener("keydown", docKeyDown, false);
}
function docKeyDown(event) {
alert(event.keyCode);
}
</script>
</defs>
<g id="canvas">
<g id="Procedure">
<rect height="600" id="background" width="800" x="0" y="0"/>
</g>
</g>
</svg>
**************************************************************
The above svg in a batik 1.6 squiggle browser gives an alert (which is coded in the docKeyDown function)on a keydown event every time a keyboard key is pressed.
But on batik 1.7 beta 1 ,only the first time is the alert displayed, after which for some reason it does not go into the function.
Any ideas on what is going on? Do we have to do it differently in batik 1.7? Or is it a known issue?
Thanks,
Emmy
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: batik 1.6 - 1.7 beta1 migration keydown eventhandler issue
Posted by th...@kodak.com.
Hi Emmy,
"Emmy Alex" <ea...@hermes.tietronix.com> wrote on 06/16/2007 09:39:18 PM:
> I seem to have a problem in batik 1.7 beta1 version. This used to
> work just fine in batik 1.6. I verified this fact using batik-
> squiggle browser.
I think the keydown bug has already been reported here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=42645
You might want to add yourself to the CC list for that bug
so you get notified when it's fixed.
> My svg which I have stripped down to showcase the problem has the
> code as shown below:
> The above svg in a batik 1.6 squiggle browser gives an alert (which
> is coded in the docKeyDown function)on a keydown event every time a
> keyboard key is pressed.
> But on batik 1.7 beta 1 ,only the first time is the alert displayed,
> after which for some reason it does not go into the function.
> Any ideas on what is going on? Do we have to do it differently in
> batik 1.7? Or is it a known issue?
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org