-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
8u31
Mac OS supports input of accented characters using a native popup which shows
up when certain character keys are held pressed for some time
(http://support.apple.com/kb/PH11264). This method is currently supported by
JDK only in components descending from java.awt.TextComponent or
javax.swing.text.JTextComponent. In custom components subclassing
javax.swing.JComponent directly, which implement text input functionality,
the above mentioned input method works incorrectly.
Details:
Sequence of events generated by JDK for scenario when user performs input of
accented character using above-mentioned method includes KEY_TYPED event for
raw character input, followed by INPUT_METHOD_EVENT with details about
accented character. Normally such sequence of events would lead to 2
characters being inserted into document - first, plain, then accented. To
make this work as expected, before emitting second event, JDK requests text
component to select previously entered character, so that accented character
would overwrite it. This logic (implemented in selectPreviousGlyph method of
sun.lwawt.macosx.CInputMethod class) works only for java.awt.TextComponent
and javax.swing.text.JTextComponent descendants - there's an explicit
'instanceof' check in the code. This makes it impossible for custom text
input components, subclassing JComponent directly, to support the mentioned
input method.
up when certain character keys are held pressed for some time
(http://support.apple.com/kb/PH11264). This method is currently supported by
JDK only in components descending from java.awt.TextComponent or
javax.swing.text.JTextComponent. In custom components subclassing
javax.swing.JComponent directly, which implement text input functionality,
the above mentioned input method works incorrectly.
Details:
Sequence of events generated by JDK for scenario when user performs input of
accented character using above-mentioned method includes KEY_TYPED event for
raw character input, followed by INPUT_METHOD_EVENT with details about
accented character. Normally such sequence of events would lead to 2
characters being inserted into document - first, plain, then accented. To
make this work as expected, before emitting second event, JDK requests text
component to select previously entered character, so that accented character
would overwrite it. This logic (implemented in selectPreviousGlyph method of
sun.lwawt.macosx.CInputMethod class) works only for java.awt.TextComponent
and javax.swing.text.JTextComponent descendants - there's an explicit
'instanceof' check in the code. This makes it impossible for custom text
input components, subclassing JComponent directly, to support the mentioned
input method.
- relates to
-
JDK-8074882 Support 'replacement range' feature in the Input Method API
- Open