nextcloud / viewer

🖼 Simple file viewer with slideshow for media
GNU Affero General Public License v3.0
91 stars 52 forks source link

Make possible to specify the container element for the viewer #995

Open danxuliu opened 2 years ago

danxuliu commented 2 years ago

The viewer does not set nor allows to set a specific element as the container of the modal dialog, and by default modal dialogs use the body element. However, in some cases the viewer needs to be appended to a different element (for example, if a sub-element is shown in fullscreen mode, like done in Talk), as otherwise it would not be visible.

How to test

Expected result

The viewer is shown.

Actual result

The viewer is not shown (and neither its overlay).

ShGKme commented 1 year ago

Would it be fine to add a container prop, to pass it to the NcModal's container?

skjnldsv commented 1 year ago

At this point I would like to refactor the Viewer and make it a package alongside this app :see_no_evil: So people can import and call the Viewer