New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 609601 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

base tag breaks id hrefs in Chrome 50

Project Member Reported by fww@google.com, May 5 2016

Issue description

Chrome 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



 
Cc: ranjitkan@chromium.org
Labels: Needs-Feedback
Thanks for providing the details, Clicking any link on chrome 50.0.2661.94 on MAC 10.11.4, creates a new fiddle page inside the output box. Same behavior is displayed on all browsers (Firefox, Safari). Could you please confirm if this is the issue or please correct me if not the case.

Thanks.!

Comment 2 by fww@google.com, 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).
Project Member

Comment 3 by sheriffbot@chromium.org, May 7 2016

Labels: -Needs-Feedback Needs-Review
Owner: ranjitkan@chromium.org
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
Labels: -Needs-Review -OS-Mac M-52 OS-All
Owner: ----
Status: Untriaged (was: Unconfirmed)
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.!
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>
```
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 1 2016

Labels: -M-52 M-53 MovedFrom-52
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 2 2016

Labels: Hotlist-Google
Project Member

Comment 8 by sheriffbot@chromium.org, Jul 11 2016

Labels: -M-53 MovedFrom-53
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
Components: Blink>HTML

Comment 10 by tkent@chromium.org, Nov 24 2016

Components: -Blink>HTML Blink>HTML>Base
Owner: tkent@chromium.org
Status: WontFix (was: Untriaged)
<a href='#someId'> should respect to <base>.  This works as intended.

Sign in to add a comment