Bug 1528840 Comment 52 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Geoff Lankow (:darktrojan) from comment #45)

> (In reply to Thomas D. from comment #44)
> > Geoff, any idea why addEventListener() fails on the addressing widget, and only works on the document?
> 
> No idea. It works for me.

Thanks for checking, but I think there's a misunderstanding, could you please double-check:

Patch has this line activated (which works):
    document.addEventListener("keyup", awOnKeyUp);

awOnKeyUp will show on console as expected.
But if I use the following line instead, the listener doesn't complain when it's registered, but the function of the listener never gets called:

    addressingWidget.addEventListener("keyup", awOnKeyUp);

Iow, listener on document works as expected, but same listener on addressingWidget does NOT work. But according to documentation, it should work imo.

Geoff, can you please try this again:
Clear error console, outcomment the document listener from patch, and activate the addressingWidget listener.
Do you then see this message on error console? 

    console.log("awOnKeyUp");

Myself I'm not seeing that message, meaning the listener directly on addressingWidget is failing.
It should be the same for you...
(In reply to Geoff Lankow (:darktrojan) from comment #45)

> (In reply to Thomas D. from comment #44)
> > Geoff, any idea why addEventListener() fails on the addressing widget, and only works on the document?
> 
> No idea. It works for me.

Thanks for checking, but I think there's a misunderstanding, could you please double-check:

Patch has this line activated (which works):

    document.addEventListener("keyup", awOnKeyUp);

awOnKeyUp will show on console as expected.
But if I use the following line instead, the listener doesn't complain when it's registered, but the function of the listener never gets called:

    addressingWidget.addEventListener("keyup", awOnKeyUp);

Iow, listener on document works as expected, but same listener on addressingWidget does NOT work. But according to documentation, it should work imo.

Geoff, can you please try this again:
Clear error console, outcomment the document listener from patch, and activate the addressingWidget listener.
Do you then see this message on error console? 

    console.log("awOnKeyUp");

Myself I'm not seeing that message, meaning the listener directly on addressingWidget is failing.
It should be the same for you...

Back to Bug 1528840 Comment 52