<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Iosevka Fixed SS16";
        panose-1:2 0 5 9 3 0 0 0 0 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Iosevka Fixed SS16";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">It seems the problem might be related to using a Scene with depthBuffer = true.  Set it to false (or use a different constructor) and the problem goes away.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Still, this looks like a bug.  Created
<a href="https://bugs.openjdk.org/browse/JDK-8322002">https://bugs.openjdk.org/browse/JDK-8322002</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Kroiß, Florian <Florian.Kroiss@vector.com><br>
<b>Date: </b>Tuesday, December 12, 2023 at 06:28<br>
<b>To: </b>openjfx-dev@openjdk.org <openjfx-dev@openjdk.org><br>
<b>Subject: </b>Unable to select row in TableView depending on stage height<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi everyone,<br>
<br>
there seems to be a bug where, depending on the current stage height, it is not possible to select a row in a TableView by clicking on it.<br>
There is an existing bug (<a href="https://bugs.openjdk.org/browse/JDK-8133697">https://bugs.openjdk.org/browse/JDK-8133697</a>) which attributes this problem to maximizing the window, but I think it is more generally related to the stage height itself.<br>
Using the following code, I'm able to consistently reproduce the problem with JavaFX 21.0.1 on two different Windows 11 machines:<br>
<br>
package bug_report;<br>
<br>
import javafx.application.Application;<br>
import javafx.beans.property.SimpleStringProperty;<br>
import javafx.collections.FXCollections;<br>
import javafx.collections.ObservableList;<br>
import javafx.scene.Group;<br>
import javafx.scene.Scene;<br>
import javafx.scene.control.Button;<br>
import javafx.scene.control.TableColumn;<br>
import javafx.scene.control.TableView;<br>
import javafx.scene.control.cell.PropertyValueFactory;<br>
import javafx.scene.layout.VBox;<br>
import javafx.stage.Stage;<br>
<br>
public class Table extends Application {<br>
    VBox root = new VBox();<br>
<br>
    private final TableView< Entry > table = new TableView<>();<br>
<br>
    private final ObservableList< Entry > data = FXCollections.observableArrayList(new Entry("A"), new Entry("B"),<br>
        new Entry("C"), new Entry("D"));<br>
<br>
    public static void main(final String[] args) {<br>
        launch(args);<br>
    }<br>
<br>
    @Override<br>
    public void start(final Stage stage) {<br>
        Scene scene = new Scene(new Group());<br>
        final double weight = scene.getWidth();<br>
        final double height = scene.getHeight();<br>
        stage.setTitle("Table View Sample");<br>
        stage.setWidth(1000);<br>
        stage.setHeight(1038);<br>
        table.setEditable(true);<br>
<br>
        final TableColumn< Entry, String > valueCol = new TableColumn<>("Value");<br>
        valueCol.setMinWidth(1000);<br>
        valueCol.setCellValueFactory(new PropertyValueFactory< Entry, String >("value"));<br>
<br>
        table.setItems(data);<br>
        table.getColumns().add(valueCol);<br>
        root.getChildren().addAll(table);<br>
<br>
        final Button plus = new Button("+");<br>
        plus.setOnMouseClicked(evt -> {<br>
            stage.setHeight(stage.getHeight() + 1);<br>
        });<br>
        final Button minus = new Button("-");<br>
        minus.setOnMouseClicked(evt -> {<br>
            stage.setHeight(stage.getHeight() - 1);<br>
        });<br>
        root.getChildren().addAll(plus, minus);<br>
<br>
        stage.heightProperty().addListener((obs, oldV, newV) -> {<br>
            System.out.println("New height is: " + newV);<br>
        });<br>
<br>
        scene = new Scene(root, weight, height, true);<br>
        stage.setScene(scene);<br>
        stage.show();<br>
    }<br>
<br>
    public static class Entry {<br>
<br>
        private final SimpleStringProperty value;<br>
<br>
        private Entry( final String value ) {<br>
            this.value = new SimpleStringProperty(value);<br>
        }<br>
<br>
        public SimpleStringProperty valueProperty() {<br>
            return value;<br>
        }<br>
<br>
    }<br>
}<br>
<br>
Steps to reproduce:<br>
1. Launch application<br>
2. Use the "+" or "-" button to change the stage height <br>
3. Try to select a different item in the TableView. If selection is still possible, go to step 2.<br>
<br>
Finding a stage height where this problem occurs seems to depend on the screen scale.<br>
With a scale of 100 % I can reproduce the issue with at least the following heights:<br>
1018, 1022, 1038, 1042, 1044, 1045<br>
<br>
I would be more than happy if someone could take a look at this problem.<br>
<br>
Best regards<br>
Florian Kroiss<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>