batik-users@xmlgraphics.apache.org
[Top] [All Lists]

Re: Problem removeEventListener"keypress" from documentElement

Subject: Re: Problem removeEventListener"keypress" from documentElement
From: Andreas Neumann
Date: Sat, 27 Aug 2005 18:09:58 +0200
please ignore my last mail about the removeEventListener problem. The problem must be somewhere with my code. I tested again with a simpler example and there the removal of the event listeners worked fine. I still have to figure out where the problem lies.

in that simple example: http://www.carto.net/neumann/temp/keyELTest.svg the removal of the event listeners seems to work.

Andreas

Andreas Neumann wrote:

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@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>