Skip to content

Conversation

jcfilben
Copy link
Collaborator

What does this PR do?

Fixes an issue where if you tab beyond a formField and focus doesn't move to another element the node passed to withinDropPortal is undefined, resulting in the following error:

Screen Shot 2023-01-20 at 2 37 42 PM

#### Where should the reviewer start?

What testing has been done on this PR?

Tested with the following story:

import React from 'react';

import { Box, DateInput, Form, FormField } from 'grommet';

export const Test = () => (
  <Box fill align="center" justify="center">
    <Form validate="blur">
      <FormField label="Enter a date">
        <DateInput format="mm/dd/yyyy-mm/dd/yyyy" />
      </FormField>
    </Form>
  </Box>
);

export default {
  title: 'Input/Form/Test',
};

How should this be manually tested?

Using the above story tab past the DateInput

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • userEvent is used in place of fireEvent.
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Screenshots (if appropriate)

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

Yes

Is this change backwards compatible or is it a breaking change?

Backwards compatible

@jcfilben jcfilben requested a review from taysea January 23, 2023 16:30
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you!

@ericsoderberghp ericsoderberghp merged commit 1637a7a into grommet:master Jan 23, 2023
@jcfilben jcfilben added the regression An issue reporting a regression or a PR that fixes a regression label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression An issue reporting a regression or a PR that fixes a regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants