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

deviceorientation event/gyroscope (mobile devices) #7553

Closed
mkosir opened this issue Jul 25, 2019 · 1 comment
Closed

deviceorientation event/gyroscope (mobile devices) #7553

mkosir opened this issue Jul 25, 2019 · 1 comment

Comments

@mkosir
Copy link

mkosir commented Jul 25, 2019

Describe the bug
When trying to use storybook with deviceorientation event, it seems that the event doesn't get fired (not sure but noticed iframes which could be causing/blocking this). Behavior is the same on mobile devices or simulating it with dev tools.

To Reproduce
Steps to reproduce the behavior:

  1. Create component with deviceorientation event, which can be implemented as logging out the DeviceOrientationEvent values alpha, beta, gamma
  2. Write a story for the component and try to trigger the event

Expected behavior
`deviceorientation˙ event should be triggered in a story.

System:

  • OS: Win10
  • Browser: chrome
  • Framework: React
  • Version: "@storybook/react": "^5.1.9"
@mkosir
Copy link
Author

mkosir commented Jul 28, 2019

Issue can be closed.
As it turns out iframe with insecure origin (http) caused trouble receiving device motion/orientation events on mobile devices. Run storybook on localhost (https) server with provided SSL certificate and it should work.

@mkosir mkosir closed this as completed Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants