[Project_owners] Catching onkeypress events when showing a <popup>

Jed jedsbugs at gmail.com
Mon Oct 24 15:04:41 EDT 2005


Hey everyone.

I've run into a nasty issue (bug?) where I can't figure out the following:

I'm capturing onkeypress events in a textbox and displaying
information in a popupmenu that is positioned relative to the textbox
element.
(so say I press 'f' it pings a file or server, get's info on 'f' and
populates the popup with menuitems. -> kind of my own homebrewed
*simple* autocomplete)

The issue I am having is once I open the popup
(TextboxElement.showpopup(args...)), I can no longer keep typeing in
the textbox even though the cursor is obviously there, even if I focus
the textbox with js, it seem having the popup element open it 'steals'
all keypress's thinking it might be able to assign one of them to a
menu item, if I hidePopup() I can type again, but not while it's open.

Does anyone know of a way I could 'block' or remove this handler from
the popup (I've tried setting my own event handlers without luck)?

The only extension I've seen able to do this is the 'Google Suggest'
(http://www.loconet.ca/index.php?action=firefox)

 extension, and looking at it's code I can't figure out what it does
differently that is allowing you to continue to type. (maybe because
it's a autocomplete widget?)

Thanks for any help.


More information about the Project_owners mailing list