related https://javafx-jira.kenai.com/browse/RT-35765
When a tab is selected and loading the content is enabled by using getContent().requestFocus() only the content of the first selected tab is loaded. Selecting other tabs on the tabPane leaves their content empty.
Patch for class TabPaneSkin:
@@ -229,6 +229,9 @@
previousSelectedTab = selectedTab;
selectedTab = getSkinnable().getSelectionModel().getSelectedItem();
getSkinnable().requestLayout();
+ // PATCH: we need to setVisible() on selected tab, layoutChildren() does this
+ // there is another invocation of layout() at some point in the near future but too late for the focusProperty() to work properly
+ getSkinnable().layoutChildren();
} else if ("SIDE".equals(property)) {
updateTabPosition();
} else if ("WIDTH".equals(property)) {
When a tab is selected and loading the content is enabled by using getContent().requestFocus() only the content of the first selected tab is loaded. Selecting other tabs on the tabPane leaves their content empty.
Patch for class TabPaneSkin:
@@ -229,6 +229,9 @@
previousSelectedTab = selectedTab;
selectedTab = getSkinnable().getSelectionModel().getSelectedItem();
getSkinnable().requestLayout();
+ // PATCH: we need to setVisible() on selected tab, layoutChildren() does this
+ // there is another invocation of layout() at some point in the near future but too late for the focusProperty() to work properly
+ getSkinnable().layoutChildren();
} else if ("SIDE".equals(property)) {
updateTabPosition();
} else if ("WIDTH".equals(property)) {