Adopt JavaFX 8u40 dialog.