Fixed keypress issue in Firefox.