Bug 961551 - RFE: Allow numpad keys to be used in the Topic ID field
RFE: Allow numpad keys to be used in the Topic ID field
Status: CLOSED NEXTRELEASE
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
1.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: pressgang-ccms-dev
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-09 18:39 EDT by Lee Newson
Modified: 2013-06-03 00:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-03 00:48:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lee Newson 2013-05-09 18:39:42 EDT
Currently you cannot use the numpad to enter ID's into the Topic ID fields on the search page.

This should be able to be fixed by adding the KeyDown numpad ranges to the NumbersAndCommaValidator. Keycodes for the 0-9 on the numpad should be 96-105 based on http://www.w3.org/2002/09/tests/keys.html

Untested Patch:

--- NumbersAndCommaValidator.java
+++ NumbersAndCommaValidator.java
@@ -22,6 +22,8 @@
     private static final int COMMA_KEY_CODE = 188;
     private static final int ZERO_KEY_CODE = 48;
     private static final int NINE_KEY_CODE = 57;
+    private static final int ZERO_NUMPAD_KEY_CODE = 96;
+    private static final int NINE_NUMPAD_KEY_CODE = 105;
     private static final int INSERT_KEY_CODE = 45;
     private static final int MINUS_KEY_CODE = 189;
     private static final int NUMPAD_MINUS_KEY_CODE = 109;
@@ -58,7 +60,7 @@
         }
         
         /* Allow numeric keys */
-        if (keyCode >= ZERO_KEY_CODE && keyCode <= NINE_KEY_CODE) {
+        if ((keyCode >= ZERO_KEY_CODE && keyCode <= NINE_KEY_CODE) || (keyCode >= ZERO_NUMPAD_KEY_CODE && keyCode <= NINE_NUMPAD_KEY_CODE)) {
             return;
         }
Comment 1 Matthew Casperson 2013-05-29 17:08:39 EDT
Fixed in 201305300703

NOTE:
When QAing bug fixes, please make sure the build you are using is equal to or higher than the build identified above.
Comment 2 Lee Newson 2013-05-30 00:43:28 EDT
Verified, the numpad now works as expected in the ID fields.

Note You need to log in before you can comment on or make changes to this bug.