Skip to content

Conversation

@jhnns
Copy link
Contributor

@jhnns jhnns commented Oct 12, 2021

Hi there 👋

thanks for this awesome package ❤️.

I noticed that the current implementation ignores the preventScroll option when returning focus on deactivation. In order to align with focus-trap (which sets preventScroll on deactivation), I think focus-trap-react should also use this option.

What do you think? 😀

PR Checklist

Please leave this checklist in your PR.

  • Issue being fixed is referenced.
  • Source changes maintain:
    • Stated browser compatibility
    • Stated React compatibility.
  • Unit test coverage added/updated.
  • E2E test coverage added/updated.
  • Prop-types added/updated.
  • Typings added/updated.
  • Changes do not break SSR:
    • Careful to test typeof document/window !== 'undefined' before using it in code that gets executed on load.
  • README updated (API changes, instructions, etc.).
  • Changes to dependencies explained.
  • Changeset added (run yarn changeset locally to add one, and follow the prompts).
    • EXCEPTION: A Changeset is not required if the change does not affect any of the source files that produce the package bundle. For example, tooling changes, test updates, or a new dev-only dependency to run tests more efficiently should not have a Changeset since it will not affect package consumers.

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2021

🦋 Changeset detected

Latest commit: eb0d456

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
focus-trap-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@stefcameron stefcameron left a comment

Choose a reason for hiding this comment

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

@jhnns Thanks for the fix! 😄

@stefcameron
Copy link
Member

thanks for this awesome package ❤️.

My pleasure!

@jhnns
Copy link
Contributor Author

jhnns commented Oct 14, 2021

Ready to be reviewed again :)

Copy link
Member

@stefcameron stefcameron left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the changes. I'll merge once CI succeeds.

@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #499 (eb0d456) into master (44d1e68) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage   96.55%   96.58%   +0.02%     
==========================================
  Files           1        1              
  Lines         116      117       +1     
  Branches       45       46       +1     
==========================================
+ Hits          112      113       +1     
  Misses          4        4              
Impacted Files Coverage Δ
src/focus-trap-react.js 96.58% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44d1e68...eb0d456. Read the comment docs.

@stefcameron stefcameron merged commit 08a9449 into focus-trap:master Oct 14, 2021
@stefcameron
Copy link
Member

@all-contributors add @jhnns for code

@allcontributors
Copy link
Contributor

@stefcameron

I've put up a pull request to add @jhnns! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants