File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -837,7 +837,7 @@ function $LocationProvider() {
837837 // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
838838 // currently we open nice url link and redirect then
839839
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 ;
841841
842842 var elm = jqLite ( event . target ) ;
843843
Original file line number Diff line number Diff line change @@ -1539,6 +1539,19 @@ describe('$location', function() {
15391539 } ) ;
15401540
15411541
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+
15421555 it ( 'should not mess up hash urls when clicking on links in hashbang mode' , function ( ) {
15431556 var base ;
15441557 module ( function ( ) {
You can’t perform that action at this time.
0 commit comments