JDK-8122072 : [Controls, Text] Scrollbar not adjust after delete
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-11-11
  • Updated: 2015-06-17
  • Resolved: 2013-11-15
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 8
8Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Steps.

1. Run HelloTextArea (note that scrollbar and visible)
2. Focus the TextArea
3. Ctrl+a to select all
4. Delete to delete all the text
=> the scroll bar should have changed to reflect the new content in the control

hit any character key, the scrollbar changes what to what it was suppose to be.

It seems we missed the fix the scrollbar after the delete action 



Comments
http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/3efcb0d079ca
15-11-2013

Fixed by changeset 3efcb0d079ca.
15-11-2013

Yes, the problematic patch also failed to clear the new invalid flag which probably meant a lot of unnecessary work.
15-11-2013

This patch may also impact the performance issue in RT-32830. Hopefully for the better....
14-11-2013

The patch from Pavel also resolves RT-34286, so I just closed it as a duplicate of this issue.
14-11-2013

Patch is fine, +1.
14-11-2013

Review online: http://cr.openjdk.java.net/~msladecek/rt-34219/webrev.00/
14-11-2013

Attaching a patch for review in a JIRA is also fine. The main thing is to ensure that all information regarding the fix reachable from the JIRA. Please requires a code review following the process at this link. If there is something unclear or wrong, let me know and I will fix the link. https://wiki.openjdk.java.net/display/OpenJFX/Code+Reviews
13-11-2013

I can't easily follow the new review process so I asked Martin to create the review for me, he'll do it tomorrow. Meanwhile, attaching the patch.
13-11-2013

Right, before the mentioned fix, the viewContent.requestLayout() method set the content size to -1 and then updated both scrollbars, this effectively removed them, this caused relayout of the ScrollPane which in turn returned the scrollbars back (or not). After the fix, the -1s are not there, so updating the scrollbars to the same values has no effect, ScrollPane layout is not requested so the scrollbars just stay there. The fix is to request ScrollPane's layout instead of updating the scrollbars to the intermediate state.
13-11-2013

The regression was caused by fix for RT-33684, with changeset http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/1490b7a04271
13-11-2013

This is a regression in b113.
12-11-2013