Skip to content

Commit c7fc88f

Browse files
committed
Fix for first uc character of input box not firing KeyTyped
1 parent c6cc8af commit c7fc88f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSTextUI.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ public boolean handleJSEvent(Object target, int eventType, Object jQueryEvent) {
196196
* jQueryEvent.preventDefault(); jQueryEvent.stopPropagation();
197197
*/
198198
// fall through
199-
case KeyEvent.VK_SHIFT:
199+
//case KeyEvent.VK_SHIFT:
200+
//BH note 2019.11.03
201+
//Including VK_SHIFT here caused Firefox to ignore a first upper-case L in
202+
//SequenceSearcher pattern JTextField
200203
case KeyEvent.VK_CONTROL:
201204
ret = HANDLED;
202205
break;

sources/net.sf.j2s.java.core/src/swingjs/plaf/TextListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void handleJSTextEvent(JSTextUI ui, int eventType, Object jqevent) {
142142
} else if (keyCode != KeyEvent.VK_BACK_SPACE){
143143
setCaret = false;
144144
}
145-
if (lastKeyEvent != KeyEvent.KEY_TYPED)
145+
if (lastKeyEvent != KeyEvent.KEY_TYPED);// could be lastKeyEvent == 0 ??
146146
break;
147147
// fall through if this is a continuation press
148148
case KeyEvent.KEY_RELEASED:

0 commit comments

Comments
 (0)