[ https://issues.apache.org/jira/browse/PIVOT-988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321192#comment-15321192 ]
Roger Whitcomb commented on PIVOT-988: -------------------------------------- This is a one character fix: in TextPaneSkinElementView.java at line 238 the "<=" should be just "<": Index: wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinElementView.java =================================================================== --- wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinElementView.java (revision 1747417) +++ wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinElementView.java (working copy) @@ -235,7 +235,7 @@ int nodeViewOffset = nodeView.getOffset(); int characterCount = nodeView.getCharacterCount(); - if (offset >= nodeViewOffset && offset <= nodeViewOffset + characterCount) { + if (offset >= nodeViewOffset && offset < nodeViewOffset + characterCount) { characterBounds = nodeView.getCharacterBounds(offset - nodeViewOffset); if (characterBounds != null) { (This is in "trunk"; I'm checking the code in "branches/2.0.x" also.) > TextPane puts the caret and selection in the wrong place for empty lines > ------------------------------------------------------------------------ > > Key: PIVOT-988 > URL: https://issues.apache.org/jira/browse/PIVOT-988 > Project: Pivot > Issue Type: Bug > Components: wtk > Affects Versions: 2.0.4, 2.1 > Environment: All > Reporter: Roger Whitcomb > Assignee: Roger Whitcomb > Priority: Minor > Fix For: 2.1 > > > If you create an empty TextPane Document, then type Enter to create a new > line, the caret remains on the first line. It only moves to the new line when > you type another character. The same behavior happens when you try to click > with the mouse on the empty line, and when calling "setSelection" to the > empty line. All result in the selection being displayed on the line above. -- This message was sent by Atlassian JIRA (v6.3.4#6332)