Skip to content

Invalid Example for Mouse and pointer events Documentation #3661

Description

@mango906

Hi, I think here is Invalid example for this documentation

https://reactjs.org/docs/accessibility.html#mouse-and-pointer-events

In this documentation, there is a code not to close the pop-over when focusing on the child.

// If a child receives focus, do not close the popover.
onFocusHandler() {
  clearTimeout(this.timeOutId);
}

but, when i click child element, child element doesn't receive focus
so when i click child element, the pop-over closes.

CodePen

I think it's because of onFocus event does not bubble.

https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event

This example is likely to cause confusion. How about modify the example to make it work?

If I'm mistaken, I think This issue may well be closed.

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions