angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.56k stars 3.01k forks source link

fix: should not transition states when alt-clicked #3819

Closed yuheiy closed 3 years ago

yuheiy commented 3 years ago

In most browsers, clicking links with the Alt key has a special behavior, for example, Chrome downloads the target resource. As with other modifier keys, the router should stop the original navigation to avoid preventing the browser’s default behavior.

When users click a link while holding the Alt key together, the browsers behave as follows.

Windows 10:

Browser Behavior
Chrome 84 Download the target resource
Firefox 79 Prevent navigation and therefore do nothing
Edge 84 Download the target resource
IE 11 No impact

macOS Catalina:

Browser Behavior
Chrome 84 Download the target resource
Firefox 79 Prevent navigation and therefore do nothing
Safari 13 Download the target resource
christopherthielen commented 3 years ago

Thanks! https://github.com/angular-ui/ui-router/releases/tag/1.0.28