astra icon indicating copy to clipboard operation
astra copied to clipboard

Slider Jumps and Flashes white when Closing

Open RRSchweitzer opened this issue 2 years ago • 1 comments

Describe the bug:

When using the slider canvas menu in mobile/tablet and having it set to pop from the left or right, upon closing the menu blinks white and appears slightly larger just before closing.

To reproduce:

  1. Enable a side menu on mobile or tablet (canvas menu)
  2. Set the width to something less than 60% and publish
  3. Make sure the menu is a dark color and not white
  4. Now close the menu and you will see a flash with white and it will be slightly larger for a split second.

Expected behavior:

Menu should move to the side and not flash.

Reason for the Bug: Within public_html/wp-content/themes/astra/inc/builder/type/header/off-canvas/dynamic-css/dynamic.css.php there is a function called astra_off_canvas_static_css() and the default css is causing the menu to jump when active class is removed. image

Isolating the problem:

  • [x] This bug happens with no other plugins activated
  • [x ] I can reproduce this bug consistently using the steps above

WordPress version:

WordPress version: 6.0.2

Astra Theme version: Version 3.9.1 Pro

RRSchweitzer avatar Sep 07 '22 21:09 RRSchweitzer

I didn't see any, but some logic to determine if you're on mobile/tablet/desktop could help here. Could just detect the device and then set that base class with the correct max-width to match what is actually selected by the user.

RRSchweitzer avatar Sep 08 '22 11:09 RRSchweitzer