File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -776,7 +776,7 @@ function $LocationProvider() {
776
776
// TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
777
777
// currently we open nice url link and redirect then
778
778
779
- if ( ! html5Mode . rewriteLinks || event . ctrlKey || event . metaKey || event . which == 2 ) return ;
779
+ if ( ! html5Mode . rewriteLinks || event . ctrlKey || event . metaKey || event . shiftKey || event . which == 2 ) return ;
780
780
781
781
var elm = jqLite ( event . target ) ;
782
782
Original file line number Diff line number Diff line change @@ -1471,6 +1471,19 @@ describe('$location', function() {
1471
1471
} ) ;
1472
1472
1473
1473
1474
+ it ( 'should not rewrite when clicked with shift pressed' , function ( ) {
1475
+ configureService ( { linkHref : 'base/a?b=c' , html5Mode : true , supportHist : true } ) ;
1476
+ inject (
1477
+ initBrowser ( ) ,
1478
+ initLocation ( ) ,
1479
+ function ( $browser ) {
1480
+ browserTrigger ( link , 'click' , { keys : [ 'shift' ] } ) ;
1481
+ expectNoRewrite ( $browser ) ;
1482
+ }
1483
+ ) ;
1484
+ } ) ;
1485
+
1486
+
1474
1487
it ( 'should not mess up hash urls when clicking on links in hashbang mode' , function ( ) {
1475
1488
var base ;
1476
1489
module ( function ( ) {
You can’t perform that action at this time.
0 commit comments