Skip to content

Fix clarify visibilitychange event intro to mention all triggers#43177

Merged
pepelsbey merged 1 commit intomdn:mainfrom
ff1451:fix/visibilitychange-misleading-intro
Feb 20, 2026
Merged

Fix clarify visibilitychange event intro to mention all triggers#43177
pepelsbey merged 1 commit intomdn:mainfrom
ff1451:fix/visibilitychange-misleading-intro

Conversation

@ff1451
Copy link
Contributor

@ff1451 ff1451 commented Feb 20, 2026

Description

Updated the opening description of the visibilitychange event to mention all scenarios that trigger the event, not just tab switching.

Motivation

The previous description said the event fires "when the contents of its tab have become visible or have been hidden", which implies the event is only related to tab visibility.

This is misleading because the event also fires when the user navigates to a new page, minimizes or closes the browser, or switches to a different app on mobile.

These cases were only mentioned later in the "Usage notes" section. Moving this information to the intro makes the document more accurate from the start.

Additional details

No response

Related issues and pull requests

Fixes #43092

@ff1451 ff1451 requested a review from a team as a code owner February 20, 2026 20:43
@ff1451 ff1451 requested review from pepelsbey and removed request for a team February 20, 2026 20:43
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Feb 20, 2026
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you 🙂

@github-actions
Copy link
Contributor

Preview URLs (1 page)

@pepelsbey pepelsbey merged commit 923b456 into mdn:main Feb 20, 2026
7 checks passed
wbamberg added a commit to wbamberg/content that referenced this pull request Feb 26, 2026
* upstream/main: (619 commits)
  Fix usage of numbers iterator in zip example (mdn#43236)
  Synchronize with BCD v7.3.3 (mdn#43178)
  Add Firefox 148 sanitizer release note (mdn#43234)
  WebDriver conformance changes for Firefox 148 (mdn#43228)
  ci(auto-merge): fix target-repo (mdn#43139)
  Add session mgt guide (mdn#42908)
  docs(firefox-release): Finalize release notes for Fx148 release (mdn#43225)
  [Technical Review] Add folder for WebDriver BiDi and create initial landing pages (mdn#43153)
  fix: correct 'after' to 'before' in break-before always/all descriptions (mdn#43185)
  added the release note for position-try-order (mdn#43223)
  Clarify that role="button" does not inherit button functionality (mdn#43186)
  Fix wording mistake in Temporal.ZonedDateTime (mdn#43188)
  Fix description for break-before: always (mdn#43190)
  improve confusing sentance (mdn#43172)
  Document scoped customElementRegistry and related properties (mdn#43149)
  fix: correct terminology for object initializer property names (mdn#43182)
  Fix typo about arrow function expression body (mdn#43175)
  Update InterfaceData based on WebRef (mdn#43179)
  Fix clarify visibilitychange event intro to mention all triggers (mdn#43177)
  [WebExtensions] Document runtime.getVersion() method (mdn#42971)
  ...
jdatapple pushed a commit to jdatapple/content that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VisibilityChange documentation is misleading

2 participants