You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2020/12/13 19:56:52 UTC

Weird issue with element listeners

Hi,

Raúl reported this issue [1] and I didn't see any issue in that simplified
description (as I reported with my example in that issue). But we talked
offline and there's a problem.

The original problem can be found in Jewel ComboBox. If we add
*SearchFilter* bead this add a 'focus' event on the view bead input element:

COMPILE::JS
{
_textInput.element.addEventListener('focus', onInputFocus);
}

and here comes the weird issue, this seems to "remove" the listeners setup
in the ComboBoxController for the input element, in concrete the
clickHandler:

IEventDispatcher(viewBead.textinput).addEventListener(MouseEvent.CLICK,
clickHandler);

So If I don't add the SearchFilter bead, the clickHandler is called, but if
added the clickHandler is not added.
(but the button's clickHandler, that is the same and is attached in the
same block is called)
You can try to comment the line to see the effect:
//_textInput.element.addEventListener('focus', onInputFocus);

I was tracking the issue to see what could be the problem but was unable to
find the root of the cause.

Can someone help with this?

Thanks in advance

Carlos


[1] https://github.com/apache/royale-asjs/issues/1001



-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira