question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`active` and `paused` props don't work

See original GitHub issue

I have smoothly animating dialogs that fade in and fade out.

All the examples assume that the dialogs have no intro or outro animations.

I’ve forked the repository and converted the “demo-defaults” example into a test case example of what I need FocusTrap to be able to do: https://github.com/Dan503/focus-trap-react/blob/master/demo/js/demo-defaults.js#L36

There are active and paused props according to the index.d.ts file but when I try to use them, I get this error:

Uncaught Error: Your focus-trap must have at least one container with at least one tabbable node in it at all times

Basically this is what I’m asking for (in pseudo code terms):

if ( `active` prop equals `true` ) {
    activate the focus-trap
}
else if ( `active` prop equals `false` ) {
    deactivate the focus-trap
}

if ( `paused` prop equals `true` ) {
    pause the focus-trap
}
else if ( `paused` prop equals `false` ) {
    resume the focus-trap
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
stefcameroncommented, Jun 19, 2021

This was ultimately fixed with #394 that was published in v8.6.0.

1reaction
Dan503commented, May 29, 2021

Pull request created for focus-trap: https://github.com/focus-trap/focus-trap/pull/407

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to pause using React Player without using controler prop
my playSvg is working properly but I would like to add when you click on the second time the play button svg appears...
Read more >
React Spring - GitHub Pages
The pause prop literally freezes animations in time. When used in a declarative update, the declared animation is paused until the pause prop...
Read more >
How to Play and Pause CSS Animations with CSS Custom ...
Hint: it involves CSS custom properties. The importance of pausing animations. Recently, while working on the CSS-powered slideshow you'll see ...
Read more >
react-native-video - npm
All platforms now auto-play. Previously, on Android ExoPlayer if the paused prop was not set, the media would not automatically start playing.
Read more >
How To Debug React Components Using React Developer ...
When you are on a page that does not have any React components, ... Now that you've tried out React Developer Tools on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found