Automattic / Automattic/harper
YouTube: Harper defocuses comment input field
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 106
Description
**Describe the bug**
Harper will randomly defocus the comment input field while you're typing.
This is problematic because any keys the user types after the defocus will use YouTube's keyboard shortcuts and produces unexpected behavior.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to a video on YouTube.com
2. Click the comment field to write a comment.
3. Start typing.
4. Occasionally Harper will defocus the comment field.
This is not easily reproducible as it happens seemingly at random, probably due to a DOM race condition.
**Expected behavior**
Harper should not defocus the comment field.
**Platform**
Firefox Desktop v154
**Additional context**
One specific example of it happening is clicking the comment field and trying to type “The.” The comment field was immediately defocused by Harper and the “T” triggered YouTube's keyboard shortcut for that letter which switches the UI layout.
Contributor guide
Research direction
Start by tracing Harper’s YouTube comment-field integration and its focus or DOM-handling path while reproducing the issue in Firefox Desktop; the report names no file or test entry point. Confirm the intermittent defocus while typing, then verify the comment field retains focus and typed characters do not trigger YouTube shortcuts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100