Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 293841 - [FieldAssist] NumLock keyDown event should not close the proposal popup [with patch]
Summary: [FieldAssist] NumLock keyDown event should not close the proposal popup [with...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Susan McCourt CLA
QA Contact: Susan McCourt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 19:13 EDT by Hannes Erven CLA
Modified: 2010-04-26 11:57 EDT (History)
1 user (show)

See Also:


Attachments
Suggested patch that adds SWT.NUM_LOCK to ignored keyDown events in popup (131 bytes, patch)
2009-10-30 19:16 EDT, Hannes Erven CLA
susan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hannes Erven CLA 2009-10-30 19:13:41 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14
Build Identifier: 20090920-1017

I have a Text widget with a ContentProposalAdapter attached to it. The user shall input some numeric value, but on this platform (Windows 2003 Terminal Server with rdestop unix client, if that matters) there are additional keyDown events generated for num pad input. These events almost immediately close the proposal popup after user input.
Input with the normal "digit keys" works as expected.

The ContentProposalAdapter.ControlProposalPopup.TargetControlListener class currently does check for keyDown events on the SWT.CAPS_LOCK and SWT.MOD{1-4} keys and does ignore them. Any other key forces the popup to close.

I suggest to also NOT close the popup on SWT.NUM_LOCK keyDown events.

Reproducible: Always
Comment 1 Hannes Erven CLA 2009-10-30 19:16:55 EDT
Created attachment 150988 [details]
Suggested patch that adds SWT.NUM_LOCK to ignored keyDown events in popup

Diff is against http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java?view=log Revision 1.71
Comment 2 Susan McCourt CLA 2009-11-02 11:45:59 EST
I have a few remaining field assist bugs scheduled for M4, will take a look.  Thanks for the patch.
Comment 3 Susan McCourt CLA 2009-11-24 21:30:15 EST
other work taking priority over this...marking 3.6 to keep on radar.
Comment 4 Susan McCourt CLA 2010-04-15 15:21:08 EDT
Fixed in HEAD >20100415.
Note that I couldn't see the problem on my computer (which has no numlock or keypad, but does have a function/key combination that is supposed to generate a numlock).  

However it makes sense to me that if we are specifically excluding CAPS_LOCK that we should also exclude NUM_LOCK
Comment 5 Susan McCourt CLA 2010-04-26 11:57:07 EDT
verified in I20100425-2000, Win7.
Used the Find/Replace dialog regexp content assist, numlock does not close the popup.