From efc3dc78443310ceb22965049ca1f31448cf060c Mon Sep 17 00:00:00 2001 From: cep Date: Jan 09 2017 14:21:19 +0000 Subject: Proper links for PR tabs Fix issue with the URL not updating when tabs in the PR page are clicked. Fixes https://pagure.io/pagure/issue/1698 --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index c4aef29..0c1db3a 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -1383,6 +1383,12 @@ $("[data-line-number]").click(function (ev) { window.location.hash = hash; return false; }); + +// Update hash links in the addressbar according to which tab is clicked +// on the PR page. +$(document).on('click', '#pr-tabs a', function() { + window.location.hash = $(this).attr('href'); +});