This repository was archived by the owner on Apr 12, 2024. It is now read-only.
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 @@ -837,7 +837,7 @@ function $LocationProvider() {
837
837
// TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
838
838
// currently we open nice url link and redirect then
839
839
840
- if ( ! html5Mode . rewriteLinks || event . ctrlKey || event . metaKey || event . which == 2 || event . button == 2 ) return ;
840
+ if ( ! html5Mode . rewriteLinks || event . ctrlKey || event . metaKey || event . shiftKey || event . which == 2 || event . button == 2 ) return ;
841
841
842
842
var elm = jqLite ( event . target ) ;
843
843
Original file line number Diff line number Diff line change @@ -1539,6 +1539,19 @@ describe('$location', function() {
1539
1539
} ) ;
1540
1540
1541
1541
1542
+ it ( 'should not rewrite when clicked with shift pressed' , function ( ) {
1543
+ configureService ( { linkHref : 'base/a?b=c' , html5Mode : true , supportHist : true } ) ;
1544
+ inject (
1545
+ initBrowser ( ) ,
1546
+ initLocation ( ) ,
1547
+ function ( $browser ) {
1548
+ browserTrigger ( link , 'click' , { keys : [ 'shift' ] } ) ;
1549
+ expectNoRewrite ( $browser ) ;
1550
+ }
1551
+ ) ;
1552
+ } ) ;
1553
+
1554
+
1542
1555
it ( 'should not mess up hash urls when clicking on links in hashbang mode' , function ( ) {
1543
1556
var base ;
1544
1557
module ( function ( ) {
You can’t perform that action at this time.
0 commit comments