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

Unable to select last word

XMLWordPrintable

      To reproduce type several words separated by space in the text area. Put caret to the beginning and using Alt + Shift + Left Arrow start selecting word after word. You will get

      Exception in thread "JavaFX Application Thread" java.lang.StringIndexOutOfBoundsException: String index out of range: 23
      at java.lang.String.charAt(String.java:651)
      at javafx.scene.control.TextInputControl.endOfNextWord(TextInputControl.java:679)
      at javafx.scene.control.TextInputControl.selectEndOfNextWord(TextInputControl.java:595)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.selectNextWord(TextInputControlBehavior.java:440)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.selectRightWord(TextInputControlBehavior.java:458)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callAction(TextInputControlBehavior.java:178)
      at com.sun.javafx.scene.control.behavior.TextAreaBehavior.callAction(TextAreaBehavior.java:265)
      at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:222)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callActionForEvent(TextInputControlBehavior.java:137)
      at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:136)
      at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:133)

            leifs Leif Samuelsson (Inactive)
            dzinkevi Dmitry Zinkevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: