xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Neumann <neum...@karto.baug.ethz.ch>
Subject Problem removeEventListener"keypress" from documentElement
Date Fri, 26 Aug 2005 13:57:40 GMT
Hello,

I am developing a SVG textinput box (not yet finished) and ran into the 
following problem with removeEventListener() and "keypress" "keydown".

I am refering to the following example:
http://www.carto.net/papers/svg/gui/textbox/index.svg

the relevant ECMAScript code is in the file 
http://www.carto.net/papers/svg/gui/textbox/textbox.js in the function 
"textbox.prototype.handleEvent" in the lines 87-96 (if 
(evt.currentTarget.nodeName == "svg" && this.textboxStatus == 2) {) - it 
seems that the lines

document.documentElement.removeEventListener("keypress",this,false);
and
document.documentElement.removeEventListener("keydown",this,false);

don't work properly. The event listeners for the key events are still 
active after removing them. Is there something wrong in my code or is 
this a bug in Batik Squiggle? It works in ASV3 and ASV6.

If I click again in the textbox it receives the key events twice or 
several times because they did not get removed, previously.

I tested with Batik 1.6 and the latest version from svn.

I would appreciate any hint on the problem.

Thank you and all the best,
Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message