You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The full screen Visualization button does not work in Safari but does work just fine in Chrome.
To Reproduce
Steps to reproduce the behavior:
Start Safari & open JupyterLab w/graph-notebook installed
Run a query that would produce a Visualization such as "A simple example" in 02-Visualization/Air-Routes-Gremlin.ipynb
Click the "Fullscreen" button
Observe nothing happening
Expected behavior
The Visualization expands to full screen
Desktop (please complete the following information):
OS: Mac Ventura 13.0.1
Browser: Safari
Version: 16.1
Additional context
Using latest graph-notebook release w/JupyterLab 3.5.2
The issue looks to be in widgets/src/force_widget.ts in toggleExpand(). It uses document.fullscreenElement which exists in Chrome but not Safari as Safari uses document.webkitFullscreenElement.
The above PR has fixed this issue for the most part, though there is a remaining oddity only on Safari where the background in fullscreen is rendered black.
The CSS styling applied to :-webkit-full-screen for the graph widget element appears to not be respected. The subsequent ::backdrop setting could have also helped but is unfortunately not compatible with Safari. I've tried a few other possible solutions to get it to work, but no luck so far.
I could be missing something here, so let me know if you have additional ideas, and/or if this is satisfactory for the time being.
Describe the bug
The full screen Visualization button does not work in Safari but does work just fine in Chrome.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Visualization expands to full screen
Desktop (please complete the following information):
Additional context
Using latest graph-notebook release w/JupyterLab 3.5.2
The issue looks to be in widgets/src/force_widget.ts in
toggleExpand()
. It usesdocument.fullscreenElement
which exists in Chrome but not Safari as Safari usesdocument.webkitFullscreenElement
.https://github.com/sindresorhus/screenfull shows a cross-browser approach but it should also be pretty easy to implement directly using something like:
And then replace:
document.fullscreenElement
usage withfullscreenElement
elem.requestFullscreen
withrequestFullscreen
elem.requestFullscreen()
withrequestFullscreen.call(elem)
document.exitFullscreen
withexitFullScreen
document.exitFullscreen()
withexitFullscreen.call(document)
ie should end up looking something like this snippet:
See here for the basis for the above code: https://stackoverflow.com/questions/54242775/angular-7-how-does-work-the-html5-fullscreen-api-ive-a-lot-of-errors
The text was updated successfully, but these errors were encountered: