Skip to content

Commit cee0654

Browse files
Prevent IE from skipping steps on hitting Enter by preventing default behavior, which activates the "next" button a second time
1 parent 78c2d5a commit cee0654

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

intro.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
} else if (e.keyCode === 39 || e.keyCode === 13) {
106106
//right arrow or enter
107107
_nextStep.call(self);
108+
//prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers
109+
e.preventDefault();
108110
}
109111
};
110112

0 commit comments

Comments
 (0)