Hello All!
I have problem with JS game. When I block start button by code: document.getElementById('startButton').disabled = true; - firefox block keyboard inputs. (www.runwave.ru/snake/) The problem is under Firefox only (IE, Opera, Chrome work without problem). If I commented the code, keypad works under Firefox too. But there are some other problems.
If I block other button it is not help to solve the problem.
js code bug under Firefox
- DanRaisch
- Moderator
- Posts: 127246
- Joined: September 23rd, 2004, 8:57 pm
- Location: Somewhere on the right coast
Re: js code bug under Firefox
Moving to Web Development.
- Frenzie
- Posts: 2135
- Joined: May 5th, 2004, 10:40 am
- Location: Belgium
- Contact:
Re: js code bug under Firefox
First remove (blur) the focus.
Code: Select all
var startButton = document.getElementById('startButton');
startButton.blur();
startButton.setAttribute('disabled','disabled');
document.getElementById('newGameButton').setAttribute('disabled','disabled');
Intelligent alien life does exist, otherwise they would have contacted us.