Skip to content

Username appears as `@undefined` if username is pasted and selected before options load

Summary

When I paste @username and quickly hit enter the @ mention becomes @undefined.

This only happens the first time a page loads.

It's causing a QA test to fail: #321876 (closed)

Steps to reproduce

  1. Load an issue page.
  2. Paste @mlapierre and quickly press enter

What is the current bug behavior?

The @ mention appears as @undefined.

What is the expected correct behavior?

It should appear as @mlapierre

Relevant logs and/or screenshots

undefined-mention

Example Project

This issue

Output of checks

This bug happens on GitLab.com on Canary

Edited by Mark Lapierre