Skip to content

Dialog should have an initialFocus prop listed in the docs to be passed onto FocusContainer #362

@yoshi415

Description

@yoshi415

Description

I came across this when closing one dialog and after an async action triggered with onHide. After the async action returns successfully, I display a second dialog confirming success.

On displaying the second dialog, a warning Uncaught Error: You specified that the FocusContainershould focus an element on mount, but a focusable element was not found in the children. This could be because theinitialFocus prop is an invalid id or query selector, or the children do not contain a valid focusable element.undefined is displayed.

I fixed this by passing an initialFocus prop with an id to Dialog and it works fine, but this seems to be undocumented in the docs.

Version

  • React 15.4.2
  • React-MD 1.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions