diff --git a/app/assets/javascripts/vue_pipelines_index/stage.js.es6 b/app/assets/javascripts/vue_pipelines_index/stage.js.es6
index 8cc417a9966120568f7f6b659f6ffcbe5b6c4a76..cfe6ea1014086197efa94530a483ba74eb8454fe 100644
--- a/app/assets/javascripts/vue_pipelines_index/stage.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/stage.js.es6
@@ -37,15 +37,19 @@
             return flash;
           });
       },
+      /**
+       * When the user right clicks or cmd/ctrl + click in the job name or action icon,
+       * the dropdown should not be closed and the link should open in another tab.
+       * If the target is a svg we stop propagation in order to prevent
+       * the default behavior of the dropdown.
+       */
       keepGraph(e) {
         const { target } = e;
+        const svgClassName = target.getAttribute('class');
+        const svgParentClassName = target.parentElement && target.parentElement.getAttribute('class');
 
-        if (target.className.indexOf('js-ci-action-icon') >= 0) return null;
-
-        if (
-          target.parentElement &&
-          (target.parentElement.className.indexOf('js-ci-action-icon') >= 0)
-        ) return null;
+        if (svgClassName && svgClassName.indexOf('js-ci-action-icon') >= 0) return null;
+        if (svgParentClassName && svgParentClassName.indexOf('js-ci-action-icon') >= 0) return null;
 
         return e.stopPropagation();
       },
diff --git a/changelogs/unreleased/27530-fix-job-dropdown-pipeline-console-error.yml b/changelogs/unreleased/27530-fix-job-dropdown-pipeline-console-error.yml
new file mode 100644
index 0000000000000000000000000000000000000000..4436b4bee685e695728f45db0298f1cf182fade7
--- /dev/null
+++ b/changelogs/unreleased/27530-fix-job-dropdown-pipeline-console-error.yml
@@ -0,0 +1,4 @@
+---
+title: Fixes job dropdown action throws error in js console
+merge_request: 9182
+author: