Skip to content

Commit

Permalink
fix(form-builder): prevent Sanity UI autofocus behavior for image inp…
Browse files Browse the repository at this point in the history
…ut dialog

This fixes an issue in Sanity UI that (wrongly) identifies the first text input as the first focusable element, and autofocuses it when the edit dialog is opened (In many cases the first focusable element inside the Dialog the hotspot/crop tool, and this should receive autofocus instead of the first text input)
  • Loading branch information
bjoerge committed Apr 26, 2021
1 parent 184eadf commit 009ce54
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ export default class ImageInput extends React.PureComponent<Props, ImageInputSta
id={`${this._inputId}_dialog`}
onClose={this.handleCloseDialog}
width={1}
__unstable_autoFocus={false}
>
<PresenceOverlay>
<Box padding={4}>
Expand Down

0 comments on commit 009ce54

Please sign in to comment.