diff --git a/app/assets/stylesheets/framework/job_log.scss b/app/assets/stylesheets/framework/job_log.scss
index 4a57a458c50b3247b7bf6912024ebe960d13b619..fefc51bf1f742f1668c264f67e84d664c30ee078 100644
--- a/app/assets/stylesheets/framework/job_log.scss
+++ b/app/assets/stylesheets/framework/job_log.scss
@@ -22,6 +22,7 @@
   min-width: $job-line-number-width;
   margin-left: -$job-line-number-margin;
   padding-right: 1em;
+  user-select: none;
 
   &:hover,
   &:active,
diff --git a/changelogs/unreleased/prevent-job-logs-line-number-from-being-selected.yml b/changelogs/unreleased/prevent-job-logs-line-number-from-being-selected.yml
new file mode 100644
index 0000000000000000000000000000000000000000..292d133780c07454c2d2642ea08d90157859808e
--- /dev/null
+++ b/changelogs/unreleased/prevent-job-logs-line-number-from-being-selected.yml
@@ -0,0 +1,5 @@
+---
+title: Prevent job log line numbers from being selected
+merge_request: 22691
+author:
+type: fixed