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

JCEF can not get back from pdf viewers presentation mode #502

Open
JScheiterbauer opened this issue Mar 5, 2025 · 1 comment
Open

JCEF can not get back from pdf viewers presentation mode #502

JScheiterbauer opened this issue Mar 5, 2025 · 1 comment
Labels
bug Bug report

Comments

@JScheiterbauer
Copy link

JScheiterbauer commented Mar 5, 2025

Describe the bug
When viewing a PDF with the presentation mode jcef can't return to non presentation mode.

To Reproduce
Steps to reproduce the behavior:

  1. Open detailed MainFrame application
  2. Navigate to a PDF
  3. In PDF Viewer go to the toolbar (right beside the print button)
  4. Press "present" button
    -> PDF Viewers Presentation Mode is activated and JCEF can't return from it to non presentation mode.
    Also terminating the application behaves strange.

Expected behavior
Even presentation mode is not available or jcef can recover from that state.

Screenshots
See screenshots for better understanding:
Image
Image
Image

Versions (please complete the following information):

  • Windows 11, Windows 10
  • Java Version: OpenJDK 1.8.0_432, 32 bit
  • JCEF Version: 7e0ef9d
  • CEF Version: 130.1.9+gfc42567+chromium-130.0.6723.70

Additional context
The problem reproduces with JCEFs simple and detailed sample application.

Does the problem reproduce with the CEF cefclient or cefsimple sample application at the same version?
cefclient.exe starts presentationMode but can recover from it the same way as chrome (shows the ESC message and pressing ESC returns to normal view).

Does the problem reproduce with Google Chrome at the same version?
No, Chrome shows a popup that presentationMode can be left with "ESC" button. Pressing ESC button leaves the presentation mode.
Image

Add any other context about the problem here.
We currently worked around that bug by creating our own CEF build that simply doesn't contain the "Present" Button in the PDF toolbar.

File of CEF build:
./src/chrome/browser/resources/pdf/elements/viewer_toolbar.html:
https://source.chromium.org/chromium/chromium/src/+/refs/tags/130.0.6723.70:chrome/browser/resources/pdf/elements/viewer_toolbar.html;l=137
Image

@JScheiterbauer JScheiterbauer added the bug Bug report label Mar 5, 2025
@JScheiterbauer
Copy link
Author

After some additional research I found out that there already is a basic handling of the full screen mode that is also handled in the sample applications:
org.cef.handler.CefDisplayHandler.onFullscreenModeChange(CefBrowser, boolean)
But you still cannot return to non presentation/fullscreen mode because either ESC button is not passed or not interpreted correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant