volt-bootstrap-5-dashboard icon indicating copy to clipboard operation
volt-bootstrap-5-dashboard copied to clipboard

Fix for content shift (issue #59)

Open SevilleCode opened this issue 4 years ago • 5 comments

I took a look at the problem described in issue #59 and think I found the issue. It appears to be related to the white-space: nowrap value for the .nav selector. I have disabled that value for now, and so far the problem seems to be resolved. I disabled it instead of outright removing it in case it needs to be re-enabled in the future.

SevilleCode avatar Oct 10 '21 02:10 SevilleCode

Hey @SevilleCode,

Thanks for the PR.

Is this tested with the pro version? The bug, as far as I'm concerned, only happens for the pro version where the sidebar can be expanded.

Thanks, Zoltan

@PerryCodes can you check this fix out in your environment, please?

zoltanszogyenyi avatar Oct 10 '21 03:10 zoltanszogyenyi

Short answer: no. this doesn’t seem to fix the problem.

But this was also the first time that I’ve used Gulp and it raised a couple issues…

Why isn’t there a JS folder under ‘html&css’ in the original PRO download, but one gets created when I run ‘gulp build:dev’?

After running ‘gulp build:dev’ on the original download, I get yet another issue… each time I click a link in the sidenav, I’m getting a quick flash of the system scrollbar. That didn’t happen with the original files in ‘html&css’.

After commenting out the one css selector in _sidenav.scss and rebuilding with Gulp, I get the same results… original bug of content shifting is still there + the odd system scrollbar issue.

Jason

PerryCodes avatar Oct 10 '21 07:10 PerryCodes

@cordosvictor can you please check this out? Thanks!

zoltanszogyenyi avatar Oct 10 '21 08:10 zoltanszogyenyi

I figured out one of the issues...

In the 'html&css' folder included with the current 1.4.1 PRO download, all the JavaScript is located in: './assets/js/volt.js' whereas doing a build with Gulp results in the folder './js/' with JavaScript being split between the following three files:

  • sidebar.js
  • sidebar-toggle.js
  • volt.js

I've also determined that this "content shifting" only happens in Chromium-based browsers. Firefox doesn't have any content shifting, however Firefox does flash a system scrollbar in the sidenav every time a selection is made... That behavior doesn't happen in Chromium browsers with the contents of 'html&css' downloaded with 1.4.1. But as I mention above, rebuilding with Gulp gives me a copy that does flash the system scrollbar in the sidenav regardless of browser.

PerryCodes avatar Oct 10 '21 08:10 PerryCodes

@zoltanszogyenyi I did not test it in the pro version. Since I was encountering the problem in the free version, I tackled it there. Disabling the white-space: nowrap value fixed the issue for me, so I thought it might fix it for everyone else. But like @PerryCodes said, the problem does seem to only be present in Chromium browsers.

SevilleCode avatar Oct 10 '21 15:10 SevilleCode