Skip to content

UI-router issue with IE8 #452

Closed
Closed
@smeka16

Description

@smeka16

UI-router does not work with IE 8 when I have a button markup like the one below

<input type="submit" class="btn btn-primary" value="Next" data-ui-sref="Users.Create.StepX" />

When I click on the button nothing happens. It works in chrome ,IE9 and IE10 but not in IE8.

It seems the issue is with e.which in below code in angular-ui-router.js.

IE8 doesnot provide any value to e.which and it defaults to 0 and is causing issue.

 element.bind("click", function(e) {
        if ((e.which == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
          $state.go(ref.state, params, { relative: base });
          scope.$apply();
          e.preventDefault();
        }
      });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions