From 67913670dcc6ca228654f2c6e14d0992636c5bb7 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Thu, 10 Dec 2015 13:50:31 -0200 Subject: [PATCH] Make selectors more specific when setting the tab content Reason: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2023 --- app/assets/javascripts/merge_request_tabs.js.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index e4fa03c0ac5..79ef746d57f 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -133,7 +133,7 @@ class @MergeRequestTabs @_get url: "#{source}.json" success: (data) => - document.getElementById('commits').innerHTML = data.html + document.querySelector("div#commits").innerHTML = data.html $('.js-timeago').timeago() @commitsLoaded = true @scrollToElement("#commits") @@ -144,7 +144,7 @@ class @MergeRequestTabs @_get url: "#{source}.json" + @_location.search success: (data) => - document.getElementById('diffs').innerHTML = data.html + document.querySelector("div#diffs").innerHTML = data.html $('div#diffs .js-syntax-highlight').syntaxHighlight() @diffsLoaded = true @scrollToElement("#diffs") @@ -155,7 +155,7 @@ class @MergeRequestTabs @_get url: "#{source}.json" success: (data) => - document.getElementById('builds').innerHTML = data.html + document.querySelector("div#builds").innerHTML = data.html $('.js-timeago').timeago() @buildsLoaded = true @scrollToElement("#builds")