mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-25 12:20:24 -04:00
if the report or add to studio modals are open, don't switch to fulls… (#2145)
* if the report or add to studio modals are open, don't switch to fullscreen on orientationchange landscape * fix linting errors
This commit is contained in:
parent
79afc55f26
commit
14741e1cb8
1 changed files with 2 additions and 1 deletions
|
@ -124,7 +124,8 @@ class Preview extends React.Component {
|
|||
* landscape format should make the fullscreen mode active
|
||||
*/
|
||||
const isMobileDevice = screen.height <= frameless.mobile || screen.width <= frameless.mobile;
|
||||
if (this.props.playerMode && isMobileDevice) {
|
||||
const isAModalOpen = this.state.addToStudioOpen || this.state.reportOpen;
|
||||
if (this.props.playerMode && isMobileDevice && !isAModalOpen) {
|
||||
const isLandscape = screen.height < screen.width;
|
||||
if (isLandscape) {
|
||||
this.props.setFullScreen(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue