coreui-react icon indicating copy to clipboard operation
coreui-react copied to clipboard

CSidebar - hides after zooming in and does not come back after setting standard zoom

Open klaseca opened this issue 3 years ago • 1 comments
trafficstars

Systems:

Ubuntu

  • Version: 20.04
  • Chrome Version 103.0.5060.134

Windows

  • Version 10 Pro 21H2
  • Chrome Version 103.0.5060.114

Steps to repeat:

  • Go to page - https://coreui.io/demos/react/4.3/dark/#/dashboard
  • Zoom in on the page until the sidebar disappears
  • Revert zoom to it is original state

Expected: Sidebar hides when zoomed in and returns when zoomed in to standard

Actual: Sidebar hides when zoomed in and not returns when zoomed in to standard

klaseca avatar Jul 26 '22 11:07 klaseca

Hi, I confirm the same problem.

Another issue possibly related, is that after you increase the window size, the sidebar element gets the 'hide' css class added to it, which is why you have to click twice on the hamburger button to open it again.

I did some digging and it seems to be this part of the code.

useEffect(() => {
      mobile && visible && setVisible(false);
    }, [mobile])

making it as follows resolves both problems:

useEffect(() => {
      mobile && _visible && setVisible(false);
     !mobile && !_visible && setVisible(true);
    }, [mobile])

mohyddintash avatar Sep 09 '22 11:09 mohyddintash

This also happens on high-resolution screens with a zoomed in DPI. e.g. 4k screens with 150% DPI.

KelvinTegelaar avatar Oct 20 '22 19:10 KelvinTegelaar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

github-actions[bot] avatar Dec 20 '22 14:12 github-actions[bot]

This is still an issue and seemingly solved by the single line edit above.

Lartza avatar May 11 '23 12:05 Lartza