arnowelzel / lightbox-photoswipe

Integration of PhotoSwipe to WordPress
https://arnowelzel.de/wp/en/projects/wordpress/lightbox-with-photoswipe
GNU General Public License v2.0
27 stars 7 forks source link

Open images in full screen mode #59

Closed arnowelzel closed 3 years ago

arnowelzel commented 3 years ago

Also see: https://wordpress.org/support/topic/direct-fullscreen

Provide an option to open the lightbox in full screen mode, so the user does not have to click the full screen button manually.

arnowelzel commented 3 years ago

After considering the implications and the technical issues of this feature, I decided not to implement this.

1) There must be a delay between opening the lightbox and activating fullscreen - depending on the browser and operating system betwwen 0.1 up to 0.5 seconds! Otherwise the full screen view wouldn't work correctly. And in rare cases even 0.5 seconds are not enough.

2) Activating full screen only works as a result of a user interaction. Browsers don't allow fullscreen outside an event handler of a user interaction. So the behaviour would be quite strange: when clicking an image it would open full screen, but when opening a direct link to the image it would open full window.

3) There is a certain logic for the UI in PhotoSwipe which includes keyboard shortcuts like [F] for fullscreen or [Esc] to get back one step. This will break if opening an image will directly go to full screen since the [Esc] key has to be pressed twice then. And adding some "hack" to change the meaning of the [Esc] key depending on how a lightbox was opened is really "ugly".

3) And finally: As a visitor would be quite irritated if I click a picture and this would cover my whole screen even if I did not want this. It's like opening links in a new window - users are forced to accept something even if they want to. You can always choose full screen display as a second step but if fullscreen is the default, you can't avoid images being opened this way.