Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
DeviceOrientationEvent not working on IOS (14.7)

I have this very simple code, based on MDN, to check the device orientation:

const message = document.getElementById("message");
message.textContent = "Start";

document.querySelector("body").addEventListener("click", () => {
    message.textContent = "Clicked";
    window.addEventListener('deviceorientation', function(event) {
        message.textContent = "Triggered";
    });    
});

It is served from a https server. (You can try it here: erikpineiro.se/ori)

It works on Chrome on an Android device (haven't tested other browsers) but it does not work on any of my browsers (Safari, Chrome, Firefox) on IOS (14.7) (tested from an iPhone 8).

Thankful for any tips as to why this might be.

PS: I have read this question but trying to include

DeviceOrientationEvent.requestPermission();

ends up in the error "DeviceOrientationEvent.requestPermission is not a function"

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!