JDK-8208078 : Button is not rendered as "enabled" only on Dialog not Stage
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: x86_64
  • Submitted: 2018-07-20
  • Updated: 2018-07-24
  • Resolved: 2018-07-24
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 7. jdk 10.0.2

A DESCRIPTION OF THE PROBLEM :
Create some button on a Dialog and setDisable(true).  Button will be rendered as "disabled" appropriately. Then make the button setDisable(false). But the button is still rendered as "disabled" not "enabled".


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute attached sample code both on jre1.8.0_111 and jre_10.0.2. Click button "two".
"one" will be rendered as "enabled" under jre1.8.0_111.
"one" will be still rendered as "disabled" under 10.0.2. But actually "one" is clickable.





---------- BEGIN SOURCE ----------
import javafx.application.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.*;

public class Sample extends Application {
  
  public void start(Stage stage) throws Exception {   
    FlowPane flowPane = new FlowPane();
    Button one = new Button("one");
    one.setDisable(true);
    Button two = new Button("two");
    two.setOnAction(e->one.setDisable(false));
    Label label = new Label(System.getProperty("java.version"));
    flowPane.getChildren().addAll(one, two, label); 
    Dialog<?> dialog = new Dialog<>();
    dialog.getDialogPane().setContent(flowPane);
    dialog.show();
  }
  
  public static void main(String[] args) {  
    Application.launch(Sample.class, args);
  }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
none


FREQUENCY : always



Comments
When reverted fix of JDK-8201285, issue is reproducible. So closing this as Duplicate of JDK-8201285.
24-07-2018

Issue is reproducible and its an regression in JDK 10+27. Windows 10, 64-bit JDK results ------------------- 8u181 : Pass 9+181 : Pass 10+26 : Pass 10+27 : Fail <== Regression 10.0.2+13 : Fail 11-ea+13 : Fail latest openjfx : Pass -------------------
23-07-2018