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

No way to close the pdf viewer on mobile/in portrait mode #279

Closed
szaimen opened this issue Dec 30, 2020 · 14 comments · Fixed by #443
Closed

No way to close the pdf viewer on mobile/in portrait mode #279

szaimen opened this issue Dec 30, 2020 · 14 comments · Fixed by #443

Comments

@szaimen
Copy link
Collaborator

szaimen commented Dec 30, 2020

Steps to reproduce

  1. install NC20
  2. open a pdf file with the pdf viewer on mobile or laptop/pc in portrait mode
  3. wait a few seconds until the viewer buttons disappear (that lay ontop of the pdf viewer for a short time)
  4. see screenshots

Expected behaviour

should be able to close the pdf viewer

Actual behaviour

cannot close the pdf viewer

Screenshots

image
image

@szaimen szaimen added the bug label Dec 30, 2020
@skjnldsv
Copy link
Member

skjnldsv commented Jan 4, 2021

We need to add a way for viewer types to register if they want the clear-view feature enabled or not.

@oogie
Copy link

oogie commented Jan 14, 2021

+1: I also have this problem, would be awesome if fixed!

Effected devices / browsers

Encountered this unwanted behaviour on Android 11 (Chrome 87.0 & FF 84.1), IOS 14.3 (Safari) and Windows 10 with small browser window sizes (FF 84.0 & Chrome 87.0). I run Nextcloud version 20.0.4 and PDF viewer 2.0.1 (according to the Nextcloud Apps overview)

Possible correct behaviour

Some sort of close button would obviously be nice. In addition: closing the whole PDF modal when the browser's back button is pressed (via window.onpopstate) would, in my opinion, be very intuitive.

@komdrive
Copy link

+1, and I also see this problem, really looking forward to the fix.
Android 11, Chrome 89, Nextcloud 20.0.8.1 (PDF Viewer 2.0.1)

I get out of the situation: press "refresh page" and press "cancel" or press "back" and "refresh"

@elpraga
Copy link

elpraga commented Mar 30, 2021

I am also experiencing this issue. Would it be possible to get the Close menu option back?

I am aware that it was deliberately eliminated from the menu, but in my opinion, it would be better to have two options in all cases to close the viewer rather than none in some cases.

@elpraga
Copy link

elpraga commented Mar 30, 2021

Displaying linear (web optimised) PDFs can be enabled on Chrome using this extension https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm (which in turn uses pdf.js)

@szaimen

This comment has been minimized.

@szaimen
Copy link
Collaborator Author

szaimen commented Apr 12, 2021

@skjnldsv is this something that must get fixed in the viewer repository or here? Do you have some pointers?

@skjnldsv
Copy link
Member

We need to add an option in the way apps register viewer rendering modules to disable the fade-out of the menus. So should be in viewer AND then here.

@skjnldsv
Copy link
Member

skjnldsv commented Apr 13, 2021

https://github.com/nextcloud/viewer/blob/b3eb0913bff415f3ca30661b997ba27fa3ea6373/src/views/Viewer.vue#L29
https://github.com/nextcloud/viewer/blob/b3eb0913bff415f3ca30661b997ba27fa3ea6373/src/services/Viewer.js#L68

Add an options in models: https://github.com/nextcloud/viewer/blob/b3eb0913bff415f3ca30661b997ba27fa3ea6373/src/models/videos.js#L25-L41
Then

OCA.Viewer.registerHandler({
id: 'pdf',
mimes: [
'application/pdf',
'application/illustrator',
],
component: PDFView,
})

And use the handler options.disableClearView if any 🤔

@elpraga
Copy link

elpraga commented Jul 13, 2021

When can this change be expected to land in the updates?

@szaimen
Copy link
Collaborator Author

szaimen commented Jul 13, 2021

In the next minor updates

@elpraga
Copy link

elpraga commented Jul 13, 2021

Thank you for your swift answer!

@CircuitC
Copy link

CircuitC commented Jul 28, 2021

The issue is closed but I still have this issue in the iOS app and in Safari mobile, would it be best to upload screenshots here?

@szaimen
Copy link
Collaborator Author

szaimen commented Jul 29, 2021

It will be fixed with the next releases

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

Successfully merging a pull request may close this issue.

6 participants