Immersive Mode Issue APDE

Dear all

I’m just tinkering with APDE to try the openKeyboard() and closeKeyboard() methods.

When I create a sketch such as below, the navigation and notification bars are hidden, so I guess I’m in Immersive Mode, which is what I want. But when openKeyboard () is called they both appear, and after calling closeKeyboard() they are still there … as if immersive mode has been disabled. Is this a bug in the keyboard methods and is there a way to get back to immersive mode?

boolean kbdOn = false;

void setup(){
  fullScreen();
  fill(255);
}

void draw(){
  background (0);
// Just for something to do ...
  rect(mouseX, mouseY, 80,80);
}

void touchEnded(){
  if (!kbdOn){
    openKeyboard();
  }
  else {
    closeKeyboard();
  }
}