Fix anchor link setting url bar

Add an explicit onclick action for anchor links so that they set the
urlbar correctly. This long standing issue really sucks in sending
around links to people from API sites.

Change-Id: I449399836d2f327188b659a266b2e860e3ebb462
This commit is contained in:
Sean Dague 2017-01-18 11:15:04 -05:00
parent e0631064db
commit d521256ccf
1 changed files with 3 additions and 1 deletions

View File

@ -478,7 +478,9 @@ def rest_method_html(self, node):
<div class="row">
<div class="col-md-2">
<div class="operation">
<a name="%(target)s" class="operation-anchor" href="#%(target)s">
<a name="%(target)s" class="operation-anchor" href="#%(target)s"
onclick="window.location.hash = hash;"
>
<span class="glyphicon glyphicon-link"></span></a>
<span class="label label-%(method)s">%(method)s</span>
</div>