Skip to content

Commit

Permalink
Close #1038 fullscreen the root element
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Aug 12, 2023
1 parent e305899 commit 6574070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/Viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class Viewer extends TypedEventTarget<ViewerEvents> {
* Checks if the viewer is in fullscreen
*/
isFullscreenEnabled(): boolean {
return isFullscreenEnabled(this.container);
return isFullscreenEnabled(this.parent);
}

/**
Expand Down Expand Up @@ -740,7 +740,7 @@ export class Viewer extends TypedEventTarget<ViewerEvents> {
*/
enterFullscreen() {
if (!this.isFullscreenEnabled()) {
requestFullscreen(this.container);
requestFullscreen(this.parent);
}
}

Expand Down

0 comments on commit 6574070

Please sign in to comment.