[JENKINS-24001] Fix navigation in selector panels for Firefox

Firefox fires a keypress event for the arrow keys. When translating the
key code with String.fromCharCode, we get a random character, which messes
up the selection filter.
Instead, we use event.charCode if available and ignore events with a zero
character code.