Jfoenix: JFXDrawer can't click content in the back even if drawer is closed

Created on 22 May 2018  路  8Comments  路  Source: sshahine/JFoenix

Whenever I close the drawer and no drawer is visible I am not able to click the buttons that are behind it. What can I do to solve this?

Most helpful comment

For this issue, I have encountered it before. Basically on close you have to set it to disable when you are closing it, and setDisable to false again when you are reopening it. Hope this helps. Attached with code snippet. Cheers! :)

if (drawer.isShown()) {
    drawer.close();
    drawer.setDisable(true);
} else {
    drawer.open();
    drawer.setVisible(true);
    drawer.setDisable(false);
}

All 8 comments

can you provide SSCCE demonstrating the issue? as i wasn't able to reproduce.

For this issue, I have encountered it before. Basically on close you have to set it to disable when you are closing it, and setDisable to false again when you are reopening it. Hope this helps. Attached with code snippet. Cheers! :)

if (drawer.isShown()) {
    drawer.close();
    drawer.setDisable(true);
} else {
    drawer.open();
    drawer.setVisible(true);
    drawer.setDisable(false);
}

Thank you so much! It worked geniusKoder! In my case I put the JFXDrawer in an AnchorPane so I just changed my code to the ff:

if(drawer.isShown()){
        drawer.close();   
        anchorPane.setDisable(true);                
}
else{
        drawer.open();   
        anchorPane.setDisable(false);            
}

Btw, I knew it. You are a youtuber. Your username did sound familiar. I remember watching some of your videos in the past hehehe. Much appreciated. Keep up the good work and thank you for helping the community!

No problem. Glad it helped you solve the problem. By the way I am not a youtuber, although I may plan to start one? Haha....

I thought you were this guy: https://www.youtube.com/channel/UC2gbhxhWVXOEgdqR7Xup9cw. Oh well, my bad haha. Anyway, thanks again for the help :)

My pleasure. Feel free to close this issue since the problem is solved. :)

@roger1891 if you can provide a sample example demonstrating the issue it would be appreciated, as this solution is a dirty fix. JFXDrawer shouldn't cause such an issue unless it was misused somehow.

Hi admin,

I think the issue was that I put the drawer inside of an Anchor Pane. So the drawer was fine but the anchor pane prevented me from using the buttons in the back.

Was this page helpful?
0 / 5 - 0 ratings