Skip to content

Preview menu: dropdown still available on mobile when changing device orientation #24385

Closed

Description

@afercia

Describe the bug

In WordPress 5.5, the Preview is now a menu with preview options for desktop, tablet, mobile, and traditional preview in a new browser tab. On small screens, this menu is meant to be hidden and replaced with a simple Preview link (no menu). The switch between the two Preview (menu and simple link) happens at a viewport width of 600 pixels.

However, when on a mobile device, changing device orientation may lead to a unexpected behavior.

To reproduce

  • using Chrome, emulate a device with a landscape viewport width larger than 600 pixels and a portrait viewport width smaller than 600 pixels, e.g.: iPhone 6/7/8 Plus
  • start in landscape orientation
  • click the Preview button
  • the Preview menu opens and displays the preview types
  • keep the menu open
  • change device orientation to portrait
  • the Preview button is now hidden and replaced by the simple Preview link
  • however, the Preview menu is still open and now its position is partially off-screen
  • more importantly: it is still possible to click the various options in the Preview menu, which I guess is not desired

Animated GIF:

preview menu and device orientation

Expected behavior
The menu to automatically close when the Preview button gets hidden.

Editor version (please complete the following information):

  • WordPress version: 5.5 RC 2
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Default.

Activity

  1. added
    [Type] Bug
    on Aug 5, 2020
  2. self-assigned this
    on Aug 12, 2020
  3. ntsekouras commented on Aug 12, 2020

    @ntsekouras
    Contributor

    Thanks @afercia for reporting this!

  4. added
    [Status] In Progress
    on Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions