Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8230926

[macosx] Two apostrophes are entered instead of one with "U.S. International - PC" layout

    XMLWordPrintable

Details

    • b03
    • b07
    • os_x

    Backports

      Description

        ADDITIONAL OS VERSION INFORMATION :
        macOS 10.13.3

        A DESCRIPTION OF THE PROBLEM :
        Two apostrophe characters are entered in a text field instead of one with "U.S. International - PC" keyboard layout, if a user types one apostrophe character followed by one consonant Latin letter.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Go to "System Preferences -> Keyboard -> Input Sources" and add "U.S. International - PC".
        2. Compile and run the test case, whose code is provided below.
        3. Press apostrophe key " ' ", press any consonant Latin letter key, for example " d " key on a keyboard.

        The bug is reproduced, if two apostrophe characters ('') are entered in the text field.

        ---------- BEGIN SOURCE ----------
        import javax.swing.*;
          
        public class JTextFieldTest {
            public static void main(String[] args) {
                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        JFrame frame = new JFrame();
                        frame.add(new JTextField(20));
                        frame.pack();
                        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                        frame.setVisible(true);
                        frame.setLocationRelativeTo(null);
                    }
                });
            }
        }
        ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

                alitvinov Anton Litvinov (Inactive)
                alitvinov Anton Litvinov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: