RFR: 8252236: TabPane - initial select tab not working properly
fastegal at openjdk.java.net
Mon Sep 14 09:14:33 UTC 2020
On Mon, 14 Sep 2020 07:09:01 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> the issue is that the header of the selected tab is not always visible (or kept visible, see report for details)
>> - initially
>> - after changing side
>> - after resizing stage/tabPane
>> Fixed in TabPaneSkin to notify its TabHeaderArea (== collaborator that is responsible for layout the tabs) whenever its
>> scroll might need an update.
>> Added tests that fail before and pass after the fix.
> In a bid to find more scenarios like you did mention description, I observed two more scenarios when selected tab does
> not stay in view. 1. Inserting tabs before or removing tabs after selected tab or moving the selected tab, causes the
> selected tab to go out of view. 2. Rotating TabPane can also take the selected tab out of view. I am little doubtful if
> it a legitimate issue. The rotations I tried clipped TabPane and TabPane header. I think rotation issue can be kept
> out of scope of this issue, can be filed as a follow on. I leave to it to you to take a call.
> About 1, I did quickly verify that it gets fixed by adding `invalidateScrollOffset();` call in
> `TabHeaderArea.removeTab()`, `TabHeaderArea.addTab()` and `TabHeaderArea.moveTab()`. Also If we fix it here, then bug
> summary might need a change. It currently reflects only initial tab.
good catch and many thanks for the evaluation - now all I'll have to do is to write tests to catch them :) Will also
update the bug summary as you suggest.
Agree, that the second can be regarded as off scope, as it seems to effect both header and content - will not do
anything in this fix.
More information about the openjfx-dev