Improve description of `focus` and `blur` events fired on `window`

Open Beginner friendly
#45,791 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
documentation

Research direction

Start with the linked Window focus events section and the Window/blur_event and Window/focus_event pages. Compare their current summaries with the cited HTML specification, then update the descriptions so they refer to the window losing or gaining focus and verify the affected documentation pages.

Written by the indexing model from the issue text.

Description

accepting PR Content:WebAPI
MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Window#focus_events

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

The blur and focus events fired on window are briefly described as:

blur: Fired when an element has lost focus.
focus: Fired when an element has gained focus.

in:
https://developer.mozilla.org/en-US/docs/Web/API/Window#focus_events
https://developer.mozilla.org/en-US/docs/Web/API/Window/blur_event
https://developer.mozilla.org/en-US/docs/Web/API/Window/focus_event

What did you expect to see?

something like:

blur: Fired when the window has lost focus.
focus: Fired when the window has gained focus.

Do you have any supporting links, references, or citations?

https://html.spec.whatwg.org/multipage/interaction.html#focus-update-steps:~:text=To%20fire%20a%20focus%20event%20named%20e%20at%20an%20element%20or%20a%20Window%20object%20target%20given%20a%20related%20target%20relatedTarget%3A

Do you have anything more you want to share?

No response

Dominant language
Markdown
Stars
11k
Forks
23.3k
Avg merge
1d 16h
Merged PRs (30d)
311

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mdn/content

All issues in mdn/content

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.