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
Unsupported API in notebook - screen.orientation #4875
Labels
Milestone
Comments
Adding |
15 tasks
ozyx
added a commit
that referenced
this issue
May 6, 2022
- Prefer to use screen.orientation API first - Then check for window.orientation (e.g. if using Safari browser on a mobile device) - Finally, fall back to using window.innerWidth/window.innerHeight
ozyx
added a commit
that referenced
this issue
May 8, 2022
- Prefer to use hasOwnProperty() over truthy check
ozyx
added a commit
that referenced
this issue
May 8, 2022
- Provides Agent instance to Notebook component - Determine device type and orientation using Agent methods instead of checking against body.classList
15 tasks
ozyx
added a commit
that referenced
this issue
May 9, 2022
Test ProceduresNote: Optionally, you can use XCode to simulate mobile Apple device hardware in order to test this. Thanks for the tip @nikhilmandlik ! Notebook no longer throws error if
|
@ozyx I'm noticing that in iPad portrait orientation, the sidebar doesn't cover the notebook entries (see the image below). Is this right? This is with an iPad Pro 11 inch (3rd generation) running iOS 15.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Summary
The standard screen orientation API is, unsurprisingly, not supported in Safari. Instead our code should feature-detect for
screen.orientation
, but fall back on the (now deprecated)window.orientation
if it's undefined.The text was updated successfully, but these errors were encountered: