Skip to content

Commit 438a62a

Browse files
committed
Correctly detect left-click on IE8, fixes #452.
1 parent 1fa3ebf commit 438a62a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stateDirectives.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ function $StateRefDirective($state) {
4444
if (isForm) return;
4545

4646
element.bind("click", function(e) {
47-
if ((e.which == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
47+
var button = e.which || e.button;
48+
49+
if ((button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
4850
$state.go(ref.state, params, { relative: base });
4951
scope.$apply();
5052
e.preventDefault();

0 commit comments

Comments
 (0)