usablica/intro.js — pull request #111 by suzannehamilton (2013-04-29 21:43:25+00:00)
Title: Fix browser compatibility

Fix issue #108: focus on Next button, which fixes the Firefox and IE bug that causes the page to darken when Enter is pressed.

The focussing caused another issue in IE: hitting Enter activates the Next button twice, once within the intro.js code, and once directly, because the focus is already on the Next button. This moves on two steps at once, skipping all even-numbered steps. I've fixed this by preventing the default behaviour, so Next is only activated once.

The third fix is for a very minor syntax error in the example pages. It was only causing a bug in the old version of FF I had installed on my Mac but seemed worth tidying up.