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

259
Views
Pointer Lock issue in CefSharp (WPF)

I have recently started working on a WPF browser application using the CefSharp framework and have hit a bit of an issue with the Pointer Lock API.

When trying to lock the pointer I am receiving the following error within the Visual Studio console.

Uncaught (in promise) WrongDocumentError: The root document of this element is not valid for pointer lock.

However, I have come across some further information on Bitbucket for the CefSharp framework stating that Pointer Lock hasn't been implemented yet this was back in 2020 and I am beginning to wonder if my Javascript implementation is wrong or if the Pointer Lock API still isn't supported yet.

I understand that most browsers support this functionality and that most browsers are running on the Chromium framework and that CefSharp is a port of that minus the UI and other bits and pieces.

Is there any way to implement this into my own project source code or even compile CefSharp from the source with the Pointer Lock functionality or would I need to use another framework that currently supports this?

Javascript

const canvas = document.getElementById("my-canvas");

canvas.onclick = () => {
    canvas.requestPointerLock();
};
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

CefSharp is just one of many Chromium Embedded Framework (CEF) wrappers. Still waiting on upstream support for pointer locking to be added in CEF. Supported has to be added in CEF first before it can be added to CefSharp.

There is an open PR https://bitbucket.org/chromiumembedded/cef/pull-requests/338 though it's been inactive for a long time.

about 4 years ago · Santiago Trujillo Report
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!