Skip to content

Commit

Permalink
add enforceFocus to fix #4691
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya committed May 27, 2021
1 parent de82b87 commit 4d9f26e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ export class Popover2DismissExample extends React.PureComponent<
return (
<Example options={false} {...this.props}>
<Popover2
// don't autofocus because it is open by default on the page,
// and it will make users scroll to this example if autofocused
inheritDarkTheme={false}
// don't autofocus or enforce focus because it is open by default on the page,
// and that will make unexpectedly users scroll to this example
autoFocus={false}
enforceFocus={false}
isOpen={this.state.isOpen}
onInteraction={this.handleInteraction}
onClosed={this.reopen}
Expand All @@ -58,6 +60,7 @@ export class Popover2DismissExample extends React.PureComponent<
/>
<Popover2
autoFocus={false}
enforceFocus={false}
captureDismiss={this.state.captureDismiss}
content={POPOVER_CONTENTS}
placement="right"
Expand Down

0 comments on commit 4d9f26e

Please sign in to comment.