Popup stops responding to keyboard input after screen change

My console popup stops responding to keyboard input (mouse input for changing focus works fine). Here’s the scenario:

  1. User presses ~ key for the first time to open the console. The popup has already been created and just needs to be shown.
  2. User enters a command that causes the game to change screens. The popup is closed.
  3. User reopens the console with ~ at the new screen. Popup opens correctly, but does not respond to keyboard input at all.

It seems like the popup is not registered with keyboard input listeners or something of the sort when showPopup() or addPopup() is called. I had a similar issue with adding and removing existing elements to panels a year back.

Related post: http://hub.jmonkeyengine.org/forum/topic/nifty-gui-console-not-receiving-key-events/