mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8187364: Unable to enter zero width non-joiner (ZWNJ) symbol in Swing text component
Reviewed-by: serb, dmarkov
This commit is contained in:
parent
8ed1c25f6b
commit
8a5f5e0f34
1 changed files with 4 additions and 5 deletions
|
@ -878,11 +878,10 @@ public class DefaultEditorKit extends EditorKit {
|
|||
isPrintableMask = ((SunToolkit)tk).isPrintableCharacterModifiersMask(mod);
|
||||
}
|
||||
|
||||
if (isPrintableMask) {
|
||||
char c = content.charAt(0);
|
||||
if ((c >= 0x20) && (c != 0x7F)) {
|
||||
target.replaceSelection(content);
|
||||
}
|
||||
char c = content.charAt(0);
|
||||
if ((isPrintableMask && (c >= 0x20) && (c != 0x7F)) ||
|
||||
(!isPrintableMask && (c >= 0x200C) && (c <= 0x200D))) {
|
||||
target.replaceSelection(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue