JDK-2158969 : 1st char. is discarded after a modal dialogue shows up and disappears
  • Type: Backport
  • Backport of: JDK-6637607
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2008-02-07
  • Updated: 2010-12-07
  • Resolved: 2009-01-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 7
5.0u17-rev b09Fixed 7Fixed
Comments
SUGGESTED FIX src/windows/native/sun/windows/awt_Component.cpp src/share/classes/java/awt/DefaultKeyboardFocusManager.java _______________________________________________________________________ ------- awt_Component.cpp ------- *** /tmp/sccs.SgdS3V Wed Jan 16 15:29:06 2008 --- awt_Component.cpp Wed Jan 16 11:28:15 2008 *************** *** 5715,5724 **** --- 5715,5727 ---- keyDownConsumed = (id == java_awt_event_KeyEvent_KEY_PRESSED); env->DeleteGlobalRef(self); env->DeleteGlobalRef(event); delete nhes; return; + + } else if (id == java_awt_event_KeyEvent_KEY_PRESSED) { + keyDownConsumed = FALSE; } /* Consume a KEY_TYPED event if a KEY_PRESSED had been, to support * the old model. */ _______________________________________________________________________ ------- DefaultKeyboardFocusManager.java ------- *** /tmp/sccs.IzXoy4 Wed Jan 16 15:29:06 2008 --- DefaultKeyboardFocusManager.java Wed Jan 16 15:17:21 2008 *************** *** 1077,1086 **** --- 1077,1089 ---- consumeTraversalKey(e); if (contains) { focusNextComponent(focusedComponent); } return; + } else if (e.getID() == KeyEvent.KEY_PRESSED) { + // Fix for 6637607: consumeNextKeyTyped should be reset. + consumeNextKeyTyped = false; } toTest = focusedComponent.getFocusTraversalKeys( KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS); contains = toTest.contains(stroke);
26-03-2008

EVALUATION See parent CR
07-02-2008