JDK-6180449 : PIT: Text in TextArea scrolls to its left one char when selecting the text from the end
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6,7
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2004-10-18
  • Updated: 2016-03-11
  • Resolved: 2016-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
Description
I have a textarea with some text. Click at end of the text and start selecting the text with mouse by dragging it till the begining of the text. The text in the textarea scrolls one char left. The first char moves out of textarea and hence gets hidden partially. This is not happening on any of the previous builds. This behavior is noticed only on WinXP, with the current PIT build.

The text should not scroll beyond the boundary of the textarea and there is no need to scroll when the length of the text is well within the textarea bounds. 

Here is the PIT build:
java version "awt.pit-jcg-win-03-2004-10-15-Fri-int.mustang"
Java(TM) 2 Runtime Environment, Standard Edition (build awt.pit-jcg-win-03-2004-10-15-Fri-int.mustang)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b08, mixed mode)

I think the following bug fix has introduced this bug:
5003402: REGRESSION: java.awt.TextArea stops scrolling when it loses the keyboard focus.

I have attached a sample test. Execute it on WinXP. Select the text using mouse starting from the end to the begining. If the text scrolls to its left, the bug is reproduced.
###@###.### 10/18/04 11:19 GMT

Comments
EVALUATION In fact, removing LockWindowUpdate does not fix this. Partial rollback of 5003402 fix does, but the consequences are unclear. Will fix this for Dolphin.
16-11-2005

EVALUATION Looks like removing LockWindowUpdate would have no real adverse effects, and it fixes. this. Need a little more testing.
01-09-2005

EVALUATION Indeed a result of 5003402 fix. Also, it was found that using LockWindowUpdate (see 5003402 fix) has adverse effects on other java processes using Swing (e.g. flicker). Should look for a different fix for 5003402. ###@###.### 2005-07-04 19:24:04 GMT
04-07-2005