提交 7a168725 编写于 作者: A alitvinov

8187364: Unable to enter zero width non-joiner (ZWNJ) symbol in Swing text component

Reviewed-by: serb, dmarkov
上级 fd169c70
...@@ -878,11 +878,10 @@ public class DefaultEditorKit extends EditorKit { ...@@ -878,11 +878,10 @@ public class DefaultEditorKit extends EditorKit {
isPrintableMask = ((SunToolkit)tk).isPrintableCharacterModifiersMask(mod); isPrintableMask = ((SunToolkit)tk).isPrintableCharacterModifiersMask(mod);
} }
if (isPrintableMask) { char c = content.charAt(0);
char c = content.charAt(0); if ((isPrintableMask && (c >= 0x20) && (c != 0x7F)) ||
if ((c >= 0x20) && (c != 0x7F)) { (!isPrintableMask && (c >= 0x200C) && (c <= 0x200D))) {
target.replaceSelection(content); target.replaceSelection(content);
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册