base tag breaks id hrefs in Chrome 50 |
||||||||
Issue descriptionChrome Version : 50.0.2661.86 OS Version: OS X 10.11.3 URLs (if applicable) : https://jsfiddle.net/2ry1yn8y/ Other browsers tested: Chrome 48: OK Firefox 46: FAIL Safari 9.0.3: FAIL What steps will reproduce the problem? 1. Create a page with a base tag (ie. <base href='/'>). 2. Add a link with href pointing to another element's id (ie. <a href='#someId'>Link</a>). What is the expected result? Clicking the link jumps/scrolls to the element with that id. What happens instead of that? Clicking links to anchor ids redirects to the base url. See https://jsfiddle.net/2ry1yn8y/ for a working example. Please provide any additional information below. Attach a screenshot if possible. I found this when I noticed SVG elements with xlink:hrefs pointing to id's not rendering (specifically textPaths referencing paths, <textPath xlink:href='#somePathId'>) and tested also with anchors pointing to ids: it seems like a bug with non-url hrefs. UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36
,
May 6 2016
Yes, the same issue is also affecting xlink:href's in SVG's, which is visible here: https://jsfiddle.net/wfalkwallace/L7dowayc/ . (the textPath is not rendering; if you remove the <base> tag, it does render).
,
May 7 2016
Thank you for providing more feedback. Adding requester "ranjitkan@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 9 2016
Able to reproduce the issue and is a non regression, since seeing it from M24 - 24.0.1300.0. Untriaging it so that it gets addressed. P.S: issue also seen on FF and Safari as well. thanks.!
,
May 9 2016
I was going to post a separate issue, but this seems related to this issue, because the xlink:href issue is affecting links within AngularJS (which are handle as if ID links). have several angular apps that have internal ngRoute links on svg objects, using an anchor tag with xlink:href attributes. This was working fine until the latest Chrome update, at which point the links stopped working. Demo here: http://www.aphasiac-design.com/angularXlinkDemo/#/ (angular 1.5.5) In the above demo, the svg link works in: Firefox 46.0.1 (OS X 10.10.5) Safari 9.1 (OS X 10.10.5) iOS Safari (don't have version number) the svg link does NOT work in: Chrome 50.0.2661.94 (OS X 10.10.5) Chrome 50.0.2661.94 (Windows 10) Chrome 50.0.2661.89 (Android 6.0.1) Perhaps this additional information will be useful. Full code of the above demo: ``` <!DOCTYPE html> <html lang="en" ng-app="xlink"> <head> <title>Angular xlink:href bug demo</title> </head> <body> <div ng-view></div> <script src="angular.min.js"></script> <script src="angular-route.min.js"></script> <script> var app = angular.module('xlink', [ 'ngRoute' ]); app.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/', { template: '<p><a href="#/target">Normal Link</a></p>' + '<svg><a xlink:href="#/target"><text x="0" y="20">SVG Link</text></svg>' }) .when('/target', { template: '<p> The linked page. <a href="#/">Go back</a></p>' }) }]); </script> </body> </html> ```
,
Jun 1 2016
Moving this nonessential bug to the next milestone. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 2 2016
,
Jul 11 2016
This issue has been moved once and is lower than Pri-1. Removing the milestone. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 11 2016
,
Nov 24 2016
<a href='#someId'> should respect to <base>. This works as intended. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by ranjitkan@chromium.org
, May 6 2016Labels: Needs-Feedback