You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preview menu: dropdown still available on mobile when changing device orientation #24385
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:
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
ntsekouras commentedon Aug 12, 2020
Thanks @afercia for reporting this!