Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL: 1.1.7 to 1.2.0-beta.6 breaks fullscreen mode ('active' of undefined) #396

Closed
TheOneAndOnlyGarcia opened this issue Mar 3, 2021 · 7 comments

Comments

@TheOneAndOnlyGarcia
Copy link

Steps to reproduce the behavior:
upgrade from 1.1.7 to 1.2.0-beta.6

tested with react 16 and 17!

Expected behavior:
open fullscreen should not throw an error

Actual behavior:
opening fullscreen throws error

Error in function FullScreen in ./node_modules/react-full-screen/dist/index.modern.js:56
🚨 Cannot read property 'active' of undefined 🚨

  56 |   if (handle.active) {
  57 |     classNames.push('fullscreen-enabled');
  58 |   }
@TheOneAndOnlyGarcia TheOneAndOnlyGarcia changed the title 1.1.7 to 1.2.0-beta.6 breaks fullscreen mode ('active' of undefined) FATAL: 1.1.7 to 1.2.0-beta.6 breaks fullscreen mode ('active' of undefined) Mar 3, 2021
@gtwilliams03
Copy link

I am getting the same error now. But I think the error is coming from the FullScreen component of react-fullscreen.

@gtwilliams03
Copy link

I am not sure how to do a pull request, but I think the error is in line 193 of the /Modal/Modal.js file.

This:

<FullScreen enabled={isFullscreen} onChange={this.handleFullscreenChange}>

should be:

<FullScreen enabled={isFullscreen} onChange={this.handleFullscreenChange} handle={_handle}>

like in their examples:

import { FullScreen, useFullScreenHandle } from 'react-full-screen'
...
const _handle = useFullScreenHandle()

@gtwilliams03
Copy link

Never mind - we just need to wait for the pull request at #397 from @foglerek to get merged. It looks like he has this sorted already.

@luskin
Copy link

luskin commented Apr 29, 2021

Bump. Can we get this merged in?

@davwheat
Copy link
Collaborator

Done. Releasing now! Sorry all -- been stressing with some exams coming up.

@luskin
Copy link

luskin commented Apr 29, 2021

Appreciate you @davwheat, thanks for jumping in and getting this merged 🙌🏼

@davwheat
Copy link
Collaborator

Released: 1.2.0-beta.7

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

No branches or pull requests

4 participants