Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FocusEvent pages #14127

Merged
merged 2 commits into from
Sep 29, 2022
Merged

Update FocusEvent pages #14127

merged 2 commits into from
Sep 29, 2022

Conversation

danburzo
Copy link
Contributor

@danburzo danburzo commented Mar 21, 2022

Summary

I've made the following updates:

  • Note that focusin/focusout follow their non-bubbling counterparts;
  • Note that focusin/focusout don't (yet) have an event handling property;
  • Add the description of the FocusEvent.relatedTarget property on all events;
  • Link to HTMLElement.focus() / .blur() methods from the similarly-named event pages.
  • Adds a section to FocusEvent that describes the difference in the order of events between the spec and current browser implementations, and points to it from the focusin/focusout pages.

Fixes #14084.

Motivation

I propose these changes to make the FocusEvent pages more useful to readers by matching what they will experience in browsers.

Supporting details

Related issues

Fixes #14084.

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@danburzo danburzo requested a review from a team as a code owner March 21, 2022 11:59
@danburzo danburzo requested review from jpmedley and removed request for a team March 21, 2022 11:59
@github-actions github-actions bot added the Content:WebAPI Web API docs label Mar 21, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2022

Preview URLs (7 pages)
Flaws (7)

Note! 6 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Element
Title: Element
Flaw count: 7

  • macros:
    • /en-US/docs/Web/API/Element/getBoxQuads does not exist
    • /en-US/docs/Web/API/Element/select_event redirects to /en-US/docs/Web/API/HTMLInputElement/select_event
    • /en-US/docs/Web/API/HTMLElement/oncopy redirects to /en-US/docs/Web/API/HTMLElement/copy_event
    • /en-US/docs/Web/API/HTMLElement/oncut redirects to /en-US/docs/Web/API/HTMLElement/cut_event
    • /en-US/docs/Web/API/HTMLElement/onpaste redirects to /en-US/docs/Web/API/HTMLElement/paste_event
  • bad_bcd_links:
    • no explanation!
    • no explanation!
External URLs (2)

URL: /en-US/docs/Web/API/HTMLElement/focus
Title: HTMLElement.focus()


URL: /en-US/docs/Web/API/FocusEvent
Title: FocusEvent

(this comment was updated 2022-09-28 00:17:32.865423)

files/en-us/web/api/element/blur_event/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/element/focus_event/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/element/focusin_event/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/element/focusout_event/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/focusevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/focusevent/index.md Outdated Show resolved Hide resolved
@Rumyra
Copy link
Collaborator

Rumyra commented Sep 2, 2022

@danburzo from what I can see the changes suggested have been made - can you confirm?

If you resolve conflicts we should be able to get this pr through 👍

* Note that focusin/focusout follow their non-bubbling counterparts;
* Note that focusin/focusout don't (yet) have an event handling property;
* Add the description of the FocusEvent.relatedTarget property on all events;
* Link to HTMLElement.focus() / .blur() methods from the similarly-named event pages.
@danburzo
Copy link
Contributor Author

@Rumyra I've adapted my proposed changes to the new structure for FocusEvent pages.

Substantial new things:

  • The description for FocusEvent.relatedTarget is now specific to each event, but does not repeat the cases where relatedTarget might be null, which can be consulted on the property's page.
  • I've removed mentions of the onfocusin / onfocusout event handling properties, which are not currently specced (see whatwg/html#4542)

@estelle
Copy link
Member

estelle commented Sep 28, 2022

@jpmedley Is this ok to merge?

@jpmedley jpmedley merged commit 957f729 into mdn:main Sep 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content bug: Description of focus events matches current spec but not reality
4 participants