Skip to content

"Turn screen horizontal for best viewing experience" shows on NON mobile devices. #4834

@DerekFXu

Description

@DerekFXu
Image

See attached screenshot for an image of this. This banner was appearing for us even on laptops. I believe this is occurring due to the code in question here. (line 148 of CSETWebNg/src/app/layout/layout-main/layout-main.component.ts)

if (hasTouchScreen) {
    this.isMobile = true; 
} else {
  this.isMobile = false;
}
if(this.isMobile){
  this._snackBar.open('Turn screen horizontal for best viewing experience', "Close", {
    verticalPosition: 'top',
    panelClass: ['notify-snackbar']
  });
}

The laptops we were using have touch screens which I believe would make this flag true and thus give us that banner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions